Skip to content

Commit 484d13c

Browse files
DeveloperAllyclaude
andcommitted
ci(workflows): Phase 3+3.5 — wire frontmatter gate, fix branch targeting across 21 workflows
Phase 3 — Frontmatter CI gate: - check-docs-guide-catalogs.yml: add frontmatter taxonomy check step (PR-only, changed files, warn-only) - ownerless-governance-surfaces.json: frontmatter-contract rollout_state advisory → pr-changed Phase 3.5 — Branch var standardisation: Group A (dead main-only push triggers → docs-v2, add workflow_dispatch): broken-links, test-v2-pages, verify-ai-sitemap, verify-llms-files, test-suite Group B (missing checkout ref on scheduled/dispatch runs → vars.DEPLOY_BRANCH): freshness-monitor, project-showcase-sync, content-health, seo-refresh, style-homogenise, v2-external-link-audit Group C (remove dead main from multi-branch trigger lists): check-docs-index, openapi-reference-validation, check-ai-companions, check-docs-guide-catalogs Group D (generator workflows: main → docs-v2, add use_test_branch input, explicit git push origin HEAD:${{ steps.branch.outputs.name }}): generate-docs-guide-catalogs, generate-component-registry, generate-docs-index, generate-ai-sitemap, generate-ai-companions, generate-llms-files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5534a4d commit 484d13c

21 files changed

Lines changed: 119 additions & 38 deletions

‎.github/workflows/broken-links.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Check Broken Links
33
on:
44
pull_request:
55
branches:
6-
- main
6+
- docs-v2
7+
workflow_dispatch:
78

89
jobs:
910
broken-links:
@@ -26,7 +27,7 @@ jobs:
2627
- name: Set up Node.js
2728
uses: actions/setup-node@v4
2829
with:
29-
node-version: "22"
30+
node-version: '22'
3031

3132
- name: Install Mintlify globally
3233
run: npm install -g mintlify

‎.github/workflows/check-ai-companions.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
pull_request:
55
branches:
66
- docs-v2
7-
- main
87
push:
98
branches:
109
- docs-v2
11-
- main
1210
workflow_dispatch:
1311

1412
jobs:

‎.github/workflows/check-docs-guide-catalogs.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
pull_request:
55
branches:
66
- docs-v2
7-
- main
87
push:
98
branches:
109
- docs-v2
11-
- main
1210
workflow_dispatch:
1311

1412
jobs:

‎.github/workflows/check-docs-index.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
pull_request:
55
branches:
66
- docs-v2
7-
- main
87
push:
98
branches:
109
- docs-v2
11-
- main
1210
workflow_dispatch:
1311

1412
jobs:

‎.github/workflows/content-health.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ vars.DEPLOY_BRANCH }}
1214
- uses: actions/setup-node@v4
1315
with:
1416
node-version: '20'

‎.github/workflows/freshness-monitor.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20+
ref: ${{ vars.DEPLOY_BRANCH }}
2021

2122
- name: Check pipeline freshness
2223
id: freshness

‎.github/workflows/generate-ai-companions.yml‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
# NOTE: THIS GITHUB ACTION WILL ONLY RUN ON MAIN BRANCH.
2-
31
name: Generate AI Companion Files
42

53
on:
64
push:
75
branches:
8-
- main
6+
- docs-v2
97
paths:
108
- 'v2/**/*.mdx'
119
workflow_dispatch:
10+
inputs:
11+
use_test_branch:
12+
description: "Write to TEST_BRANCH (docs-v2-dev) instead of DEPLOY_BRANCH"
13+
type: boolean
14+
default: false
1215

1316
jobs:
1417
generate-ai-companions:
@@ -21,6 +24,15 @@ jobs:
2124
ref: ${{ inputs.use_test_branch == 'true' && vars.TEST_BRANCH || vars.DEPLOY_BRANCH }}
2225
token: ${{ secrets.GITHUB_TOKEN }}
2326

27+
- name: Resolve target branch
28+
id: branch
29+
run: |
30+
if [ "${{ inputs.use_test_branch }}" = "true" ]; then
31+
echo "name=${{ vars.TEST_BRANCH }}" >> "$GITHUB_OUTPUT"
32+
else
33+
echo "name=${{ vars.DEPLOY_BRANCH }}" >> "$GITHUB_OUTPUT"
34+
fi
35+
2436
- name: Setup Node.js
2537
uses: actions/setup-node@v4
2638
with:
@@ -46,4 +58,4 @@ jobs:
4658
git config user.email "actions@github.com"
4759
git add v2/**/*-data.json
4860
git commit -m "chore(ai-companions): regenerate glossary companion JSONs - $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
49-
git push
61+
git push origin HEAD:${{ steps.branch.outputs.name }}

‎.github/workflows/generate-ai-sitemap.yml‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
# NOTE: THIS GITHUB ACTION WILL ONLY RUN ON MAIN BRANCH.
2-
31
name: Generate AI Sitemap
42

53
on:
64
push:
75
branches:
8-
- main
6+
- docs-v2
97
workflow_dispatch:
8+
inputs:
9+
use_test_branch:
10+
description: "Write to TEST_BRANCH (docs-v2-dev) instead of DEPLOY_BRANCH"
11+
type: boolean
12+
default: false
1013

1114
jobs:
1215
generate-ai-sitemap:
@@ -19,6 +22,15 @@ jobs:
1922
ref: ${{ inputs.use_test_branch == 'true' && vars.TEST_BRANCH || vars.DEPLOY_BRANCH }}
2023
token: ${{ secrets.GITHUB_TOKEN }}
2124

25+
- name: Resolve target branch
26+
id: branch
27+
run: |
28+
if [ "${{ inputs.use_test_branch }}" = "true" ]; then
29+
echo "name=${{ vars.TEST_BRANCH }}" >> "$GITHUB_OUTPUT"
30+
else
31+
echo "name=${{ vars.DEPLOY_BRANCH }}" >> "$GITHUB_OUTPUT"
32+
fi
33+
2234
- name: Setup Node.js
2335
uses: actions/setup-node@v4
2436
with:
@@ -42,4 +54,4 @@ jobs:
4254
git config user.email "actions@github.com"
4355
git add sitemap-ai.xml
4456
git commit -m "Update AI sitemap - $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
45-
git push
57+
git push origin HEAD:${{ steps.branch.outputs.name }}

‎.github/workflows/generate-component-registry.yml‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
# NOTE: THIS GITHUB ACTION WILL ONLY RUN ON MAIN BRANCH.
2-
31
name: Generate Component Registry
42

53
on:
64
push:
75
branches:
8-
- main
6+
- docs-v2
97
paths:
108
- 'snippets/components/**/*.jsx'
119
workflow_dispatch:
10+
inputs:
11+
use_test_branch:
12+
description: "Write to TEST_BRANCH (docs-v2-dev) instead of DEPLOY_BRANCH"
13+
type: boolean
14+
default: false
1215

1316
jobs:
1417
generate-component-registry:
@@ -21,6 +24,15 @@ jobs:
2124
ref: ${{ inputs.use_test_branch == 'true' && vars.TEST_BRANCH || vars.DEPLOY_BRANCH }}
2225
token: ${{ secrets.GITHUB_TOKEN }}
2326

27+
- name: Resolve target branch
28+
id: branch
29+
run: |
30+
if [ "${{ inputs.use_test_branch }}" = "true" ]; then
31+
echo "name=${{ vars.TEST_BRANCH }}" >> "$GITHUB_OUTPUT"
32+
else
33+
echo "name=${{ vars.DEPLOY_BRANCH }}" >> "$GITHUB_OUTPUT"
34+
fi
35+
2436
- name: Setup Node.js
2537
uses: actions/setup-node@v4
2638
with:
@@ -50,4 +62,4 @@ jobs:
5062
docs-guide/config/component-registry.json \
5163
docs-guide/config/component-registry-schema.json
5264
git commit -m "chore(components): regenerate component registry - $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
53-
git push
65+
git push origin HEAD:${{ steps.branch.outputs.name }}

‎.github/workflows/generate-docs-guide-catalogs.yml‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# NOTE: THIS GITHUB ACTION WILL ONLY RUN ON MAIN BRANCH.
2-
31
name: Generate Docs Guide Catalogs
42

53
on:
64
push:
75
branches:
8-
- main
6+
- docs-v2
97
paths:
108
- '.github/workflows/**'
119
- '.github/ISSUE_TEMPLATE/**'
@@ -14,6 +12,11 @@ on:
1412
- 'docs.json'
1513
- 'v2/index.mdx'
1614
workflow_dispatch:
15+
inputs:
16+
use_test_branch:
17+
description: "Write to TEST_BRANCH (docs-v2-dev) instead of DEPLOY_BRANCH"
18+
type: boolean
19+
default: false
1720

1821
jobs:
1922
generate-docs-guide-catalogs:
@@ -26,6 +29,15 @@ jobs:
2629
ref: ${{ inputs.use_test_branch == 'true' && vars.TEST_BRANCH || vars.DEPLOY_BRANCH }}
2730
token: ${{ secrets.GITHUB_TOKEN }}
2831

32+
- name: Resolve target branch
33+
id: branch
34+
run: |
35+
if [ "${{ inputs.use_test_branch }}" = "true" ]; then
36+
echo "name=${{ vars.TEST_BRANCH }}" >> "$GITHUB_OUTPUT"
37+
else
38+
echo "name=${{ vars.DEPLOY_BRANCH }}" >> "$GITHUB_OUTPUT"
39+
fi
40+
2941
- name: Setup Node.js
3042
uses: actions/setup-node@v4
3143
with:
@@ -70,4 +82,4 @@ jobs:
7082
docs-guide/catalog/pages-catalog.mdx \
7183
v2/
7284
git commit -m "chore(docs-guide): regenerate catalogs and component docs - $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
73-
git push
85+
git push origin HEAD:${{ steps.branch.outputs.name }}

0 commit comments

Comments
 (0)