Skip to content

PabRod/auto-ghpages-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

title
auto-ghpages

Example for generating Github.io pages from Readme with Pandoc. We use the following:

The output can be viewed here: github.io/readme-pages Github repo: github.com/jhidding/readme-pages

Pandoc

Pandoc is the Universal document converter. We can use it to convert our README file into html.

    docker run pandoc/core pandoc --version

First try it locally:

    mkdir -p build
    docker run -v $PWD:/tmp pandoc/core -s /tmp/README.md \
            --metadata title="Hello, Pandoc" > build/index.html

Now we wish to run this command from a Github Action and upload the result to the gh-pages branch.

    name: Deploy pages
    on:
        push:
            branches:
              - main
    jobs:
        deploy:
            runs-on: ubuntu-latest
            steps:
                - name: checkout
                  uses: actions/checkout@v2
                - name: prepare
                  run: |
                    mkdir -p build
                    touch build/.nojekyll   
                - name: pandoc
                  uses: docker:https://pandoc/core:2.12
                  with:
                    args: >-
                      --standalone
                      --output=build/index.html
                      --metadata title="Hello, Pandoc"
                      README.md
                - name: deploy
                  uses: JamesIves/[email protected]
                  with:
                    branch: gh-pages
                    folder: build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published