From 1e5c19d02b5d770a3270f850420fbebc5a95dbf6 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 19 Mar 2020 17:08:24 -0700 Subject: [PATCH] Add GitHub Actions workflow to build book and push to github pages - Run book build on all commits - Deploy site on pushes to master type: development --- .github/workflows/site.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/site.yaml diff --git a/.github/workflows/site.yaml b/.github/workflows/site.yaml new file mode 100644 index 0000000..7909d50 --- /dev/null +++ b/.github/workflows/site.yaml @@ -0,0 +1,28 @@ +name: Site + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + all: + name: All + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: latest + - run: mdbook build book --dest-dir ../docs/book + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/master' + with: + github_token: ${{secrets.GITHUB_TOKEN}} + publish_branch: gh-pages + publish_dir: ./docs