Repository navigation
fix(docs): publish Gatekeeper/Schemas/ to GitHub Pages at the $id paths - #114
Merged
Merged
Conversation
Both schema files' $id now point at https://heyitsgilbert.github.io/Gatekeeper/schema/1.0.0/{FeatureFlag,Properties}.json (#105), but nothing published them there - the Pages workflow only ever copied static/ and guides/ into docs/ before the mkdocs build. The $id URLs have been dead (404) since that schema correction landed. Adds 'Gatekeeper/Schemas/:docs/schema/1.0.0/' to the Pages workflow's additional_copies input, following the exact pattern already used for static/ and guides/. mkdocs copies non-Markdown files under docs/ as static assets verbatim, so both JSON files land at exactly the $id path once published. Verified locally: replicated the reusable workflow's Copy-Item logic against a scratch docs/ tree, then ran a real 'mkdocs build' (Material theme + plugins from docs/requirements.txt) against it. Both files land at site-dir/schema/1.0.0/{FeatureFlag,Properties}.json exactly as served content would. (Content reflects main's current pre-#112 schema in this verification, since #112 hasn't merged yet - the $id values themselves will be correct automatically on the next Pages build once it does; this fix is about the publish path, not schema content.)
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the workflow change to publish JSON schemas at versioned URLs.
No open issues 🎉
What changed in this PR
Updates the documentation publishing workflow to serve Gatekeeper’s JSON schemas at the versioned URLs specified by the $id values in PR #112.
Changes:
- Adds
Gatekeeper/Schemas/to the Pages workflow’s copy list, targetingdocs/schema/1.0.0/. - Leaves schema contents and existing documentation copy paths unchanged.
| File | Description |
|---|---|
.github/workflows/Pages.yaml |
Copies JSON schemas into the documentation tree for publication under /schema/1.0.0/. |
Review effort: Balanced
Test Results 4 files 448 suites 12s ⏱️ Results for commit 9dcd7ad. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
# .github/workflows/Pages.yaml additional_copies: | static/:docs/assets/images/ guides/:docs/guides/ + Gatekeeper/Schemas/:docs/schema/1.0.0/Both schema files'
$idnow point athttps://heyitsgilbert.github.io/Gatekeeper/schema/1.0.0/{FeatureFlag,Properties}.json(#105), but nothing ever published them there — the Pages workflow only ever copiedstatic/andguides/intodocs/before themkdocs build. Those$idURLs have been 404 since the schema correction landed.Follows the exact
source:destinationpattern already in use forstatic//guides/.mkdocscopies non-Markdown files underdocs/as static assets verbatim, preserving the relative path — so both JSON files land at exactly the$idpath once published (confirmed viasite_url: http://heyitsgilbert.github.io/Gatekeeper+docs/schema/1.0.0/*.json→https://heyitsgilbert.github.io/Gatekeeper/schema/1.0.0/*.json).Evidence
Before:
Gatekeeper/Schemas/*.jsonnever copied intodocs/; the$idURLs 404.After (local verification): replicated the reusable workflow's exact
Copy-Item -Path $source -Destination $dest -Recurse -Forcelogic (confirmed a directory source with a trailing slash copies contents into the destination, not a nested subfolder) against a scratchdocs/tree, then ran a realmkdocs build(Material theme + plugins fromdocs/requirements.txt) against it:Both files land at exactly
site-dir/schema/1.0.0/{FeatureFlag,Properties}.json. Content in this verification reflectsmain's current pre-#112 schema (placeholder$id), since #112 hasn't merged yet — this PR is about the publish path, not schema content; the correct$idvalues publish automatically on the next Pages build once #112 lands, no further change needed here.Merge Danger
Door: Two-way — one workflow-input line, trivially revertable.
Blast Radius: Low. Purely additive to the Pages build (new files published under
/schema/1.0.0/); doesn't touch any existing copied path, nav entry, or schema file content.