Skip to content

ci(docs): add validate-only CI for docs.json + sidebar links - #1

Merged
EmeditWeb merged 1 commit into
mainfrom
ci/docs-validate
Sep 24, 2026
Merged

EmeditWeb merged 1 commit into
mainfrom
ci/docs-validate

Conversation

@EmeditWeb

Copy link
Copy Markdown
Member

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.json or a sidebar link pointing at a non-existent page fails the build instead of shipping.

Changes

  • New .github/workflows/ci.yml — validate-docs job (Node 20, 5-min timeout, contents: read), triggers on push + PR for all branches.
  • New .github/scripts/validate-docs.mjs — standalone Node script (no package.json needed) that:
    1. Parses docs.json (fails on invalid JSON / missing sidebar).
    2. Walks the sidebar tree and asserts every internal href resolves to a docs/<path>.mdx|.md (or .../index.*) file. External http(s) links are skipped.
    3. Reports docs files that exist but are unreferenced as non-fatal warnings.

Testing

Ran node .github/scripts/validate-docs.mjs locally against current content:

Checked 31 sidebar links against 31 doc files.

✓ docs.json is valid and every sidebar link resolves.

Exit code 0 — the gate is green on today's content and will fail only on a real regression.

Security checklist

  • No secrets, keys, or tokens committed
  • Read-only workflow permissions (contents: read)
  • Script only reads local files; no network or shell-out

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).
@EmeditWeb
EmeditWeb merged commit 2304e50 into main Sep 24, 2026
2 checks passed
@EmeditWeb
EmeditWeb deleted the ci/docs-validate branch September 29, 2026 10:44
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.

1 participant