-
Notifications
You must be signed in to change notification settings - Fork 31
66 lines (57 loc) · 1.63 KB
/
pages.yml
File metadata and controls
66 lines (57 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Pages
on:
push:
branches:
- main
paths:
- "workers/**"
- ".github/workflows/pages.yml"
- "wrangler.toml"
- "CLOUDFLARE.md"
workflow_dispatch:
inputs:
deploy_worker:
description: "Deploy the documentation router Worker."
required: false
type: boolean
default: true
permissions:
actions: write
contents: read
concurrency:
group: pages
cancel-in-progress: false
jobs:
worker:
name: Validate and deploy router
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: Validate Worker bundle
run: npx wrangler@4.88.0 deploy --dry-run --config wrangler.toml
- name: Deploy to Cloudflare
if: github.event_name == 'workflow_dispatch' && inputs.deploy_worker == true
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
if: github.event_name == 'workflow_dispatch' && inputs.deploy_worker == true
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run docs-live-smoke.yml --ref main