From 708336f35eea787d6aebacdff24cc7e92a1d9c1d Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 1 Nov 2022 18:47:10 +0100 Subject: [PATCH] Deploy the example book --- .github/workflows/mdbook.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/mdbook.yml diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml new file mode 100644 index 0000000..3059371 --- /dev/null +++ b/.github/workflows/mdbook.yml @@ -0,0 +1,31 @@ +name: github pages + +on: + push: + branches: + - main + pull_request: + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: 'latest' + + - run: | + cd book + mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book/book