Skip to content

update

update #6

name: Pages Deployment
on:
push:
branches:
- main
env:
MDBOOK_VERSION: v0.4.40
jobs:
deploy-cloudflare:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest mdbook
run: |
url="https://github.com/rust-lang/mdbook/releases/download/$MDBOOK_VERSION/mdbook-$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
mdbook build
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy book --project-name=${{ secrets.CLOUDFLARE_PROJECT }} --commit-dirty=true