Skip to content

fix(docs): publish Gatekeeper/Schemas/ to GitHub Pages at the $id paths - #114

Merged
HeyItsGilbert merged 1 commit into
mainfrom
fix/publish-schemas-to-pages
Nov 3, 2026
Merged

HeyItsGilbert merged 1 commit into
mainfrom
fix/publish-schemas-to-pages

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Owner

Summary

 # .github/workflows/Pages.yaml
       additional_copies: |
         static/:docs/assets/images/
         guides/:docs/guides/
+        Gatekeeper/Schemas/:docs/schema/1.0.0/

Both schema files' $id now point at https://heyitsgilbert.github.io/Gatekeeper/schema/1.0.0/{FeatureFlag,Properties}.json (#105), but nothing ever published them there — the Pages workflow only ever copied static/ and guides/ into docs/ before the mkdocs build. Those $id URLs have been 404 since the schema correction landed.

Follows the exact source:destination pattern already in use for static//guides/. mkdocs copies non-Markdown files under docs/ as static assets verbatim, preserving the relative path — so both JSON files land at exactly the $id path once published (confirmed via site_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/*.json never copied into docs/; the $id URLs 404.

After (local verification): replicated the reusable workflow's exact Copy-Item -Path $source -Destination $dest -Recurse -Force logic (confirmed a directory source with a trailing slash copies contents into the destination, not a nested subfolder) against a scratch docs/ tree, then ran a real mkdocs build (Material theme + plugins from docs/requirements.txt) against it:

INFO    -  Building documentation to directory: /tmp/site-build
INFO    -  Documentation built in 0.28 seconds
$ find /tmp/site-build/schema -type f
/tmp/site-build/schema/1.0.0/FeatureFlag.json
/tmp/site-build/schema/1.0.0/Properties.json

Both files land at exactly site-dir/schema/1.0.0/{FeatureFlag,Properties}.json. Content in this verification reflects main'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 $id values 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.

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.)
Copilot AI balanced review requested due to automatic review settings November 3, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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, targeting docs/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

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Test Results

    4 files    448 suites   12s ⏱️
  379 tests   374 ✅  5 💤 0 ❌
1 492 runs  1 466 ✅ 26 💤 0 ❌

Results for commit 9dcd7ad.

@HeyItsGilbert
HeyItsGilbert merged commit f8136d0 into main Nov 3, 2026
9 of 10 checks passed
@HeyItsGilbert
HeyItsGilbert deleted the fix/publish-schemas-to-pages branch November 3, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants