Skip to main content

Docs Site Deployment

The documentation site is built with Docusaurus and auto-deploys to Cloudflare Pages on every push to main.

How It Works

push to main → GitHub Actions → npm run build → wrangler pages deploy → Cloudflare Pages
  1. A push to main that changes docs/ or website/ triggers the Deploy Docs workflow
  2. GitHub Actions builds the Docusaurus site in website/
  3. The cloudflare/wrangler-action deploys the website/build/ output to Cloudflare Pages
  4. The site is live at openclaw-acd.pages.dev

The workflow file is at .github/workflows/deploy-docs.yml.

Cloudflare Pages Setup (One-Time)

1. Create the Pages project

wrangler pages project create openclaw --production-branch main

2. Create a Cloudflare API token

  1. Go to Cloudflare API Tokens
  2. Click Create Token
  3. Use the "Edit Cloudflare Workers" template (includes Pages permissions)
  4. Click Continue to summaryCreate Token
  5. Copy the token

3. Add GitHub secrets

The GitHub Actions workflow needs two secrets:

SecretValueWhere to get it
CLOUDFLARE_API_TOKENThe API token from step 2Cloudflare dashboard
CLOUDFLARE_ACCOUNT_IDYour Cloudflare account IDwrangler whoami
gh secret set CLOUDFLARE_API_TOKEN --body "your-token-here" --repo langhalsb/openclaw
gh secret set CLOUDFLARE_ACCOUNT_ID --body "your-account-id" --repo langhalsb/openclaw

4. Verify

Push a change to docs/ or website/ and check the workflow:

gh run list --repo langhalsb/openclaw --limit 1

Local Development

just docs-dev     # Dev server at http://localhost:3000
just docs-build # Production build
just docs-serve # Serve production build locally
just docs-deploy # Manual deploy to Cloudflare Pages

Manual Deploy

If you need to deploy without pushing to GitHub:

just docs-deploy

This builds the site and deploys directly via wrangler pages deploy.

LLMs.txt

The site generates llms.txt and llms-full.txt at build time following the llmstxt.org standard. These files provide LLM-friendly versions of all documentation:

  • https://openclaw-acd.pages.dev/llms.txt — table of contents with links
  • https://openclaw-acd.pages.dev/llms-full.txt — full content in a single document

Path Filters

The GitHub Actions workflow only triggers on changes to:

  • docs/** — documentation source files
  • website/** — Docusaurus config, theme, and dependencies

Changes to scripts, root files, or other directories don't trigger a rebuild.

Regenerating the Cloudflare API Token

If the token is rotated or expired:

  1. Create a new token at Cloudflare API Tokens

  2. Update the GitHub secret:

    gh secret set CLOUDFLARE_API_TOKEN --body "new-token-here" --repo langhalsb/openclaw
  3. The next push to docs/ or website/ will use the new token automatically