Repository navigation
Conversation
Add .github/workflows/bundle-specs.yml that regenerates and commits the bundled-V*_SSP-*.yaml files whenever a source SSP YAML (or the bundling tooling) changes on github-pages, replacing the manual 'npm install && npm run bundle && commit' procedure. - Pushes directly to github-pages; supports an optional BUNDLE_PUSH_TOKEN secret for protected-branch pushes, falling back to GITHUB_TOKEN. - Loop-safe: path filter matches only source 'V*_SSP-*.yaml' (not 'bundled-V...'), and GITHUB_TOKEN commits don't retrigger workflows. - Update docs/README.md and docs/DEPLOYMENT-CHECKLIST.md to document the automated flow and the manual fallback.
There was a problem hiding this comment.
🟡 Changes recommended
Shared-schema triggers, Pages deployment with the default token, and default-branch registration for manual dispatch need correction.
3 open issues
What changed in this PR
Automates SSP bundling for the docs site while keeping specification authoring and version selection manual.
Changes:
- Adds a workflow to regenerate and commit bundled SSP files on
github-pages. - Documents automation, token setup, and local debugging commands.
| File | Description |
|---|---|
| docs/README.md | Explains automated bundling and manual responsibilities. |
| docs/DEPLOYMENT-CHECKLIST.md | Updates maintenance steps for automation. |
| .github/workflows/bundle-specs.yml | Adds bundle regeneration and commit workflow. |
Review effort: Balanced
| paths: | ||
| # Source SSP YAMLs (filename starts with "V", so "bundled-V..." never matches, | ||
| # which prevents the workflow's own commit from re-triggering it). | ||
| - '**/V*_SSP-*.yaml' |
There was a problem hiding this comment.
Good catch — fixed in 047caf8. The trigger now includes both Part1-MetaModel-Schemas/openapi.yaml and Part2-API-Schemas/openapi.yaml, since their definitions are inlined into every SSP bundle. The README and deployment checklist now mention these triggers as well.
| - 'package.json' | ||
| - 'package-lock.json' | ||
| - '.github/workflows/bundle-specs.yml' | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Agreed — fixed in 047caf8. Since this workflow intentionally lives only on github-pages rather than the default branch, the advertised manual dispatch was not available. I removed workflow_dispatch and the Run workflow references from both docs; the documented local command remains the manual/debug fallback.
| # Set a repo/org secret named BUNDLE_PUSH_TOKEN (a PAT or fine-grained | ||
| # token with "Contents: write") and, if the branch is protected, allow | ||
| # that identity to bypass the push restrictions. | ||
| token: ${{ secrets.BUNDLE_PUSH_TOKEN || github.token }} |
There was a problem hiding this comment.
Agreed — fixed in 047caf8. BUNDLE_PUSH_TOKEN is now required rather than optional, with an early validation step and no GITHUB_TOKEN fallback. I also removed [skip ci] so the PAT push can trigger the branch-based Pages rebuild. The generated-file path does not match this workflow’s trigger, so it remains loop-safe. The token requirement and reason are now documented in both docs.
Pre-condition before mergingThe repository or organization secret The token should be a PAT or fine-grained token with Contents: write access to this repository. If @mjacoby would it be possible to configure BUNDLE_PUSH_TOKEN as defined above? We can also discuss this in our WG meeting. |

What this does
Automates the one error-prone, mechanical step in maintaining the docs site: regenerating the bundled SSP files. After PR #692, whenever an SSP source YAML changes on
github-pages, someone had to remember to runnpm install && npm run bundleand commit exactly the rightbundled-*.yamlfiles. Forgetting it brings back the Swagger UI resolver errors for v3.2+ specs.This adds a GitHub Actions workflow (
.github/workflows/bundle-specs.yml) that does it automatically.Addresses #701.
How it works
github-pagesthat changes a sourceV*_SSP-*.yaml, either sharedopenapi.yamlschema, or the bundling tooling.npm ci→npm run bundle→ commits only the regenerated*/bundled-V*_SSP-*.yamlback togithub-pages. If nothing changed, it commits nothing.bundled-V...files, so the bot's bundle-only commit never re-triggers this workflow.BUNDLE_PUSH_TOKENsecret (PAT or fine-grained token with Contents: write). UnlikeGITHUB_TOKEN, a push made with this credential triggers the branch-based GitHub Pages rebuild. The token identity must also be allowed to push ifgithub-pagesis protected.Verified locally: a full run bundles 34/34 SSPs and the output is byte-identical to the files currently committed.
What we deliberately did NOT automate — and why
We scoped this intentionally narrowly, because not everything here is safe to automate:
github-pagesstays manual. The spec content ongithub-pagesis hand-maintained and currently differs frommain(the two branches have independently-authored v3.2 content). There is no reproducible transform frommain, so a human must decide what lands.DEFAULT_VERSIONinversions.jsand the default paths in the HTML viewers) stays manual — it's a deliberate one-off change per major/minor.main → github-pagessync. Auto-copying specs frommainwould silently overwrite the hand-edited content ongithub-pages. That reconciliation (which branch is authoritative, and eventually makingmainthe single source of truth) is a bigger architectural decision for the working group — out of scope here.In short: bundling is deterministic and safe to automate; anything that authors spec content or changes the published version is not, so it stays under human control.
Docs
docs/README.mdanddocs/DEPLOYMENT-CHECKLIST.mdare updated to spell out this automated-vs-manual split, keeping the localnpm run bundlecommands as a debug fallback.For a later discussion (not in this PR)
mainandgithub-pages.mainthe single source of truth and deploying the site via GitHub Actions (or a clean, CI-only Pages branch), which would let us stop committing bundled artifacts entirely.