-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 1.88 KB
/
Copy pathdeploy-starlight.yml
File metadata and controls
71 lines (62 loc) · 1.88 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
67
68
69
70
71
name: Deploy Starlight docs to Cloudflare
on:
push:
branches: [main]
# Only run when something the build actually consumes changes —
# avoids re-deploying when the legacy docusaurus tree or unrelated
# repo files are touched.
paths:
- "starlight/**"
- "v1/**"
- "v2/**"
- "v3/**"
- "snippets/**"
- "images/**"
- "assets/**"
- "mp4/**"
- "fonts/**"
- "favicon.svg"
- ".github/workflows/deploy-starlight.yml"
# Manual trigger from the Actions tab.
workflow_dispatch:
# Cancel any in-flight deploy when a newer commit lands on main.
concurrency:
group: deploy-starlight
cancel-in-progress: true
jobs:
deploy:
name: Build & deploy
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: starlight/pnpm-lock.yaml
- name: Install dependencies
working-directory: starlight
run: pnpm install --frozen-lockfile
- name: Build site
working-directory: starlight
run: pnpm build
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: starlight
# The docs Worker has no zone route — it's invoked via service
# binding from the inertiacore.net frontdoor worker. wrangler
# reads ./wrangler.toml and uploads ./dist via the [assets]
# block, no route negotiation needed.
command: deploy