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.

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:

  1. GitHub Actions checks out the repo
  2. Installs Node 22 and runs npm ci in docs-openclaw/
  3. Builds the Docusaurus site (npm run build)
  4. Deploys the docs-openclaw/build/ output to Cloudflare Pages via wrangler

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

  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 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 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
  • docs-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:

  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 docs-openclaw/ will use the new token automatically