ci(docs): add validate-only CI for docs.json + sidebar links - #1
Merged
Merged
Conversation
StepFi-Docs had no CI. Add a lightweight workflow that runs on every push and PR: validate that docs.json parses as JSON and that every internal sidebar href resolves to a real file under docs/ (external links skipped; unreferenced files reported as non-fatal warnings). Uses a standalone Node script — no docs toolchain or package.json required. Passes clean today (31 links / 31 files).
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
No linked issue — CI/tooling hardening (Phase 2 quality gates).
StepFi-Docs had no CI at all. This adds a lightweight, dependency-free validation workflow that runs on every push and PR, so a malformed
docs.jsonor a sidebar link pointing at a non-existent page fails the build instead of shipping.Changes
.github/workflows/ci.yml—validate-docsjob (Node 20, 5-min timeout,contents: read), triggers on push + PR for all branches..github/scripts/validate-docs.mjs— standalone Node script (nopackage.jsonneeded) that:docs.json(fails on invalid JSON / missingsidebar).hrefresolves to adocs/<path>.mdx|.md(or.../index.*) file. Externalhttp(s)links are skipped.Testing
Ran
node .github/scripts/validate-docs.mjslocally against current content:Exit code 0 — the gate is green on today's content and will fail only on a real regression.
Security checklist
contents: read)