Cloudflare Pages ☁️
Deploy your docs to Cloudflare Pages.
Local Source
If GITTYDOCS_SOURCE points at a folder in this repo, build then deploy ./dist/client.
via Cloudflare Pages (recommended)
Connect the repo in Cloudflare Pages, then set:
- Build Command:
npx gittydocs@latest build "./docs" - Build Output Directory:
dist/client
If your docs folder isn't docs/, update the build path.
via GitHub Actions
Generate a workflow:
npx gittydocs@latest deploy --cfpagesThis writes .github/workflows/deploy-gittydocs.yml.
Required GitHub Actions secrets:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
Generated workflow:
name: Deploy Gittydocs (Cloudflare Pages)
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: oven-sh/setup-bun@v2
- run: npx gittydocs@latest build "./docs"
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ github.event.repository.name }}
directory: ./dist/clientIf your Cloudflare Pages project name is not your repo name, edit projectName.
