-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 2.44 KB
/
Copy pathdocs.yml
File metadata and controls
91 lines (79 loc) · 2.44 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Deploy Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'proto/**'
- 'scripts/gen-api-docs.py'
- 'scripts/build-bench-manifest.py'
- 'package.json'
- 'yarn.lock'
- '.yarnrc.yml'
- '.github/workflows/docs.yml'
# Re-run when bench-data branch updates (new bench JSONs arrive).
# The bench-data branch is auto-pushed by .github/workflows/bench.yml
# after each main-push bench run; the docs build merges its
# bench-results/ tree before vitepress build.
workflow_run:
workflows: [bench]
types: [completed]
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
# Pull bench-results/ from the `bench-data` orphan branch so
# the manifest builder sees the latest JSONs. Branch may not
# exist on first deploy — fall back to local bench-results/
# (committed manually for the first runs / for edits).
- name: Merge bench-data branch contents
run: |
set -euo pipefail
if git ls-remote --exit-code --heads origin bench-data > /dev/null 2>&1; then
git fetch origin bench-data:bench-data
git checkout bench-data -- bench-results/ || true
echo "::notice::merged bench-data branch into bench-results/"
else
echo "::notice::bench-data branch not present yet; using bench-results/ from main"
fi
ls -R bench-results/ 2>/dev/null | head -30 || true
- uses: actions/setup-node@v6
with:
node-version: 24
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Build documentation
run: yarn docs:build
env:
DOCS_BASE: /
VITE_GA_ID: ${{ vars.GA4_MEASUREMENT_ID }}
- uses: actions/upload-pages-artifact@v4
with:
path: docs/.vitepress/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v5
id: deployment