From 78c6c5fb16844180b60f303bd4722db96e326f91 Mon Sep 17 00:00:00 2001 From: clabby Date: Fri, 24 Nov 2023 02:35:37 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20book=20deployment=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/book.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/book.yaml diff --git a/.github/workflows/book.yaml b/.github/workflows/book.yaml new file mode 100644 index 000000000..c6db165cd --- /dev/null +++ b/.github/workflows/book.yaml @@ -0,0 +1,29 @@ +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Publish to Cloudflare Pages + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.10' + # mdbook-version: 'latest' + - name: Build book + working-directory: ./book + run: 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