Repository navigation
56 lines (54 loc) · 2.09 KB
/
Copy pathdocs.yaml
File metadata and controls
56 lines (54 loc) · 2.09 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
name: Publish Docs
on:
push:
branches: [main]
paths:
- .github/workflows/docs.yaml
- README.md
- build_system/builder/gate/tools/web/check_docs_holding_build.py
- config/gate.toml
- build_system/scripts/web/check-docs-holding-build.py
- build_system/scripts/web/check-web-surface.sh
- build_system/scripts/build/lib/exec_lock.sh
- web/docs/**
jobs:
build:
runs-on: ubuntu-latest
name: Build docs
permissions:
contents: read
deployments: write
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
with:
version: 10.34.5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version: 24
cache: pnpm
cache-dependency-path: web/docs/pnpm-lock.yaml
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86
- name: Install
run: cd web/docs && pnpm install --frozen-lockfile
- name: Build
run: bash build_system/scripts/web/check-web-surface.sh docs
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy web/docs/dist/ --project-name=capsem-docs
- name: Smoke public docs site
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
SITE_URL: https://docs.capsem.org
OLD_ROUTE_URL: https://docs.capsem.org/getting-started/
run: bash build_system/scripts/web/smoke-docs-site.sh