Skip to content

Commit be29ef4

Browse files
committed
fix: unchain merge-tags:generate from docs:generate -- it broke the Pages deploy
docs:generate runs inside .github/workflows/deploy.yml, so appending a step that hard-fails without MERGE_TAGS_TOKEN took the entire site build down with it: run 32555981823 failed on "no token" where the previous deploy had succeeded. My change, my mistake. The fetcher still fails loudly -- that is right for the artifact, because an empty catalog renders as a product with no merge tags. It is not right for it to decide whether every other page on the site ships. It stays an explicit script. Once the secret exists, deploy.yml gets its own step, which the fetcher's docblock now spells out.
1 parent 5637c2f commit be29ef4

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"tokens:verify": "node ./scripts/verify-token-interop.mjs",
2323
"relations:generate": "node ./scripts/generate-relations.mjs",
2424
"test": "node --test scripts/lib/",
25-
"docs:generate": "npm run hooks:generate && npm run api:generate && npm run tokens:generate && npm run relations:generate && npm run hooks:link-api-types && node ./scripts/generate-category-indexes.mjs && npm run merge-tags:generate",
25+
"docs:generate": "npm run hooks:generate && npm run api:generate && npm run tokens:generate && npm run relations:generate && npm run hooks:link-api-types && node ./scripts/generate-category-indexes.mjs",
2626
"llm:enhance": "node ./scripts/enhance-for-llms.mjs && node ./scripts/generate-product-llms.mjs",
2727
"llm:product": "node ./scripts/generate-product-llms.mjs",
2828
"docs:full": "npm run repos:clone && npm run docs:generate && npm run llm:enhance && npm run build",

scripts/fetch-merge-tags.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
* file describing nothing: a page rendering "0 merge tags" looks like a product with no merge tags,
1313
* not like a broken build, and nobody would go looking for the cause.
1414
*
15+
* NOT chained into `docs:generate`. That script runs in the Pages deploy, and wiring a step
16+
* that hard-fails without a secret took the whole site's build down with it (run
17+
* 32555981823). It stays an explicit script until MERGE_TAGS_TOKEN exists, at which point
18+
* add a step to .github/workflows/deploy.yml:
19+
*
20+
* - name: Fetch the merge-tag artifact
21+
* env:
22+
* MERGE_TAGS_TOKEN: ${{ secrets.MERGE_TAGS_TOKEN }}
23+
* run: npm run merge-tags:generate
24+
*
25+
* Failing loudly is still right for the artifact itself -- an empty catalog would render as
26+
* a product with no merge tags. It is not right for it to decide whether every other page
27+
* on the site ships.
28+
*
1529
* The source repo is PRIVATE, so this needs a token with read access to it:
1630
* MERGE_TAGS_TOKEN (CI secret; a fine-grained PAT with Contents: read on GravityKit/merge-tags)
1731
* Falls back to GITHUB_TOKEN / GH_TOKEN for local use.

0 commit comments

Comments
 (0)