Skip to content

Commit b69d020

Browse files
dfinsteranastasiaguspanclaudedbrian57johndmulhausen
authored
Update for john/WBDOCS-2044-rename-serverless-products (#2568)
Fixes the workflow for john/WBDOCS-2044-rename-serverless-products so it won't keep reverting docs.json. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Anastasia Guspan <aguspan@wandb.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Dan Brian <dbrian@coreweave.com> Co-authored-by: John Mulhausen <john.mulhausen@wandb.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent b84f8f9 commit b69d020

15 files changed

Lines changed: 1110 additions & 782 deletions

File tree

.github/workflows/knowledgebase-nav.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
# -----------------------
77
# Runs the Python script scripts/knowledgebase-nav/generate_tags.py against
88
# the repo root. That script syncs keyword footers on support articles,
9-
# rebuilds tag pages and product index MDX, and updates docs.json and the
10-
# root support.mdx counts. See scripts/knowledgebase-nav/README.md and
11-
# Architecture.md for the full pipeline.
9+
# rebuilds tag pages and product index MDX, and updates the root support.mdx
10+
# counts. The generator never edits docs.json. When the set of tag pages
11+
# changes, the PR comment posted by scripts/knowledgebase-nav/pr_report.py
12+
# lists the page ids a human must add to or remove from each
13+
# "Support: <display_name>" tab in docs.json by hand. See
14+
# scripts/knowledgebase-nav/README.md and Architecture.md for the full
15+
# pipeline.
1216
#
1317
# When it runs
1418
# ------------
@@ -101,7 +105,7 @@ jobs:
101105
id: nav_commit
102106
if: github.event_name == 'pull_request'
103107
run: |
104-
CHORE_SUBJECT="chore: regenerate support tag pages and docs.json navigation"
108+
CHORE_SUBJECT="chore: regenerate support tag pages"
105109
FIRST="$(git log -1 --pretty=%B | head -n1)"
106110
if [ "${FIRST}" = "${CHORE_SUBJECT}" ]; then
107111
echo "is_auto_nav_commit=true" >> "${GITHUB_OUTPUT}"
@@ -128,9 +132,10 @@ jobs:
128132
- name: Install dependencies
129133
run: pip install -r scripts/knowledgebase-nav/requirements.txt
130134

131-
# Writes into the working tree (support/, docs.json, support.mdx, etc.).
132-
# stderr (Python warnings) is captured for the PR comment steps below.
133-
- name: Generate tag pages and update docs.json
135+
# Writes into the working tree (support/, support.mdx, etc.). Never
136+
# edits docs.json. stderr (Python warnings) is captured for the PR
137+
# comment steps below.
138+
- name: Generate tag pages and product index
134139
run: python scripts/knowledgebase-nav/generate_tags.py --repo-root . 2>generator-warnings.log
135140

136141
- name: Show generator warnings in log
@@ -195,11 +200,12 @@ jobs:
195200
echo "::notice::Fork PR: auto-commit is skipped. Push regenerated files from scripts/knowledgebase-nav (see README) or a maintainer can run the generator after merge."
196201
197202
# Commits only if the generator changed files; file_pattern limits
198-
# which paths are staged. Skipped for fork PRs and unnecessary for
199-
# pushes with no diff (action is a no-op).
203+
# which paths are staged. docs.json is excluded so generator runs never
204+
# mutate it. Skipped for fork PRs and unnecessary for pushes with no
205+
# diff (action is a no-op).
200206
- name: Commit generated changes
201207
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) }}
202208
uses: stefanzweifel/git-auto-commit-action@v7
203209
with:
204-
commit_message: "chore: regenerate support tag pages and docs.json navigation"
205-
file_pattern: "support.mdx support/*/articles/*.mdx support/*/tags/*.mdx support/*.mdx docs.json"
210+
commit_message: "chore: regenerate support tag pages"
211+
file_pattern: "support.mdx support/*/articles/*.mdx support/*/tags/*.mdx support/*.mdx"

.github/workflows/linkcheck-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Resolve PR and deployment URL
6363
id: pr-context
6464
if: github.event_name == 'deployment_status'
65-
uses: actions/github-script@v8
65+
uses: actions/github-script@v9
6666
with:
6767
script: |
6868
const { owner, repo } = context.repo;
@@ -127,7 +127,7 @@ jobs:
127127
128128
- name: Get PR number
129129
id: get-pr
130-
uses: actions/github-script@v8
130+
uses: actions/github-script@v9
131131
with:
132132
script: |
133133
// For pull_request events, get PR number directly
@@ -298,7 +298,7 @@ jobs:
298298
steps.lychee.conclusion == 'failure') &&
299299
(github.event_name != 'pull_request' ||
300300
github.event.pull_request.head.repo.fork != true)
301-
uses: actions/github-script@v8
301+
uses: actions/github-script@v9
302302
with:
303303
script: |
304304
const fs = require('fs');

.github/workflows/mintlify-deployment-preview.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Get PR number from deployment ref
2727
id: get-pr
28-
uses: actions/github-script@v8
28+
uses: actions/github-script@v9
2929
with:
3030
script: |
3131
// The deployment ref is the branch name
@@ -79,7 +79,7 @@ jobs:
7979
- name: Get all PR changed files
8080
if: steps.get-pr.outputs.pr_number && steps.get-pr.outputs.skip_update != 'true'
8181
id: changed
82-
uses: actions/github-script@v8
82+
uses: actions/github-script@v9
8383
with:
8484
script: |
8585
const prNumber = parseInt('${{ steps.get-pr.outputs.pr_number }}');
@@ -128,7 +128,7 @@ jobs:
128128
129129
- name: Update PR comment with preview links
130130
if: steps.get-pr.outputs.pr_number && steps.get-pr.outputs.skip_update != 'true' && steps.changed.outputs.any_changed == 'true'
131-
uses: actions/github-script@v8
131+
uses: actions/github-script@v9
132132
env:
133133
PR_NUMBER: ${{ steps.get-pr.outputs.pr_number }}
134134
PREVIEW_URL: ${{ github.event.deployment_status.environment_url }}

0 commit comments

Comments
 (0)