Skip to content

Pages

Pages #205

Workflow file for this run

name: Pages
on:
push:
branches:
- main
paths:
- "workers/**"
- ".github/workflows/pages.yml"
- "wrangler.toml"
- "CLOUDFLARE.md"
workflow_dispatch:
permissions:
actions: write
contents: read
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
name: Build and deploy
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: cloudflare
url: https://documentation.openclaw.ai
steps:
- name: Check out
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- name: Install
run: npm ci
- name: Sync R2 router secrets
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
OPENCLAW_R2_ACCESS_KEY_ID: ${{ secrets.OPENCLAW_R2_ACCESS_KEY_ID }}
OPENCLAW_R2_SECRET_ACCESS_KEY: ${{ secrets.OPENCLAW_R2_SECRET_ACCESS_KEY }}
run: |
: "${CLOUDFLARE_ACCOUNT_ID:?CLOUDFLARE_ACCOUNT_ID is required}"
: "${OPENCLAW_R2_ACCESS_KEY_ID:?OPENCLAW_R2_ACCESS_KEY_ID is required}"
: "${OPENCLAW_R2_SECRET_ACCESS_KEY:?OPENCLAW_R2_SECRET_ACCESS_KEY is required}"
printf '%s' "${CLOUDFLARE_ACCOUNT_ID}" | npx wrangler@4.88.0 secret put OPENCLAW_R2_ACCOUNT_ID --config wrangler.toml
printf '%s' "${OPENCLAW_R2_ACCESS_KEY_ID}" | npx wrangler@4.88.0 secret put OPENCLAW_R2_ACCESS_KEY_ID --config wrangler.toml
printf '%s' "${OPENCLAW_R2_SECRET_ACCESS_KEY}" | npx wrangler@4.88.0 secret put OPENCLAW_R2_SECRET_ACCESS_KEY --config wrangler.toml
- name: Deploy to Cloudflare
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler@4.88.0 deploy --config wrangler.toml \
--tag "${GITHUB_SHA::12}" \
--message "openclaw/docs ${GITHUB_SHA}"
- name: Dispatch live smoke
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run docs-live-smoke.yml --ref main