Skip to content

Deploy documentation #1

Deploy documentation

Deploy documentation #1

Workflow file for this run

name: Deploy documentation
on:
workflow_dispatch: {}
push:
branches:
- main
paths:
- pkg/**
- README.md
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry toolchain
run: |
curl -OL https://github.com/foundry-rs/foundry/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar -xzf foundry_nightly_linux_amd64.tar.gz
sudo mv forge /usr/local/bin
- name: Generate documentation
run: |
forge doc -b
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
# update
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# update
projectName: ${{ secrets.CLOUDFLARE_DOCS_PROJECT_NAME }}
directory: .
# to enable Github Deployments
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
workingDirectory: docs/book