Docs Site Deployment
The documentation site is built with Docusaurus and auto-deploys to Cloudflare Pages on every push to main.
Auto-Deploy Flow (End-to-End)
You edit docs/ or docs-openclaw/
│
▼
git push origin main
│
▼
GitHub detects push on main
│ (path filter: docs/** or docs-openclaw/**)
▼
GitHub Actions triggers "Deploy Docs" workflow
│ (.github/workflows/deploy-docs.yml)
▼
Runner: checkout → install deps → npm run build
│ (builds Docusaurus into docs-openclaw/build/)
▼
wrangler pages deploy docs-openclaw/build
│ (Cloudflare API token from GitHub secrets)
▼
Live at https://openclaw-acd.pages.dev
What triggers it: Any push to main that changes files in docs/ or docs-openclaw/. Changes to scripts, root files, or other directories do not trigger a rebuild.
What it does:
- GitHub Actions checks out the repo
- Installs Node 22 and runs
npm ciindocs-openclaw/ - Builds the Docusaurus site (
npm run build) - Deploys the
docs-openclaw/build/output to Cloudflare Pages viawrangler
How it differs from Hollanov auto-deploy: The docs site deploys via GitHub Actions → Cloudflare Pages (serverless). The Hollanov site deploys via GitHub webhook → VPS (self-hosted). See Hollanov auto-deploy for that flow.
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
- Go to Cloudflare API Tokens
- Click Create Token
- Use the "Edit Cloudflare Workers" template (includes Pages permissions)
- Click Continue to summary → Create Token
- Copy the token
3. Add GitHub secrets
The GitHub Actions workflow needs two secrets:
| Secret | Value | Where to get it |
|---|---|---|
CLOUDFLARE_API_TOKEN | The API token from step 2 | Cloudflare dashboard |
CLOUDFLARE_ACCOUNT_ID | Your Cloudflare account ID | wrangler 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 docs-openclaw/ and check the workflow:
gh run list --repo langhalsb/openclaw --limit 1
Local Development
All docs operations are initiated through just recipes:
just docs-build # Build + preview at http://localhost:3001
just docs-preview # Preview existing build at http://localhost:3001
just docs-deploy # Build + deploy to Cloudflare Pages
Manual Deploy
If you need to deploy without pushing to GitHub:
just docs-deploy
This builds the site and deploys to Cloudflare Pages via wrangler.
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 linkshttps://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 filesdocs-openclaw/**— 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:
-
Create a new token at Cloudflare API Tokens
-
Update the GitHub secret:
gh secret set CLOUDFLARE_API_TOKEN --body "new-token-here" --repo langhalsb/openclaw -
The next push to
docs/ordocs-openclaw/will use the new token automatically