Files
hyperframes/.github/workflows/docs.yml
T
Miguel Ángel b0071311ed docs: serve hyperframes.json / registry JSON schemas (#304)
The three /schema/*.json URLs baked into every Hyperframes project as
\$schema references were all 404ing on the live docs site — blocking
editor autocomplete and validation for hyperframes.json, registry.json,
and registry-item.json.

Adds docs/schema/ so Mintlify serves the three expected URLs:
- /schema/hyperframes.json       (new — authored from ProjectConfig)
- /schema/registry.json          (mirrored from packages/core/schemas/)
- /schema/registry-item.json     (mirrored from packages/core/schemas/)

The registry schemas stay authoritative in packages/core/schemas/ where
they're npm-exported for @hyperframes/core consumers. scripts/sync-schemas.ts
mirrors them into docs/schema/ and a new --check mode fails the Docs
workflow if the two drift, so the npm copy and the docs copy can't
diverge silently.

Validated against the factory-series-c-video config + a default config
generated by hyperframes init; negative cases (missing registry,
extra top-level keys, empty required strings) reject as expected.
2026-04-17 17:26:22 +02:00

44 lines
902 B
YAML

name: Docs
on:
pull_request:
paths:
- "docs/**"
- "DOCS_GUIDELINES.md"
- "packages/core/schemas/**"
- "scripts/sync-schemas.ts"
push:
branches: [main]
paths:
- "docs/**"
- "DOCS_GUIDELINES.md"
- "packages/core/schemas/**"
- "scripts/sync-schemas.ts"
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate docs
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Check schema mirror (core → docs)
run: npx tsx scripts/sync-schemas.ts --check
- name: Validate build
working-directory: docs
run: npx mint validate
- name: Check broken links
working-directory: docs
run: npx mint broken-links