diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index dddb85f..7e0995c 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -27,7 +27,8 @@ jobs: run: | set -euo pipefail mkdir -p _site/specs/v3 - cp docs/index.html _site/index.html + # Stage everything in docs/ so a new asset needs no workflow change. + cp -R docs/. _site/ cp specs/v3/*.yaml _site/specs/v3/ - name: Rewrite spec paths for flat layout diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f2720d2..d370032 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -17,3 +17,15 @@ jobs: - name: Lint OpenAPI specs with Spectral run: npx --yes @stoplight/spectral-cli@^6.14.0 lint specs/v3/*.yaml --fail-severity error + + - name: Check design tokens referenced by the docs page are defined + run: | + set -euo pipefail + missing=0 + for name in $(grep -oE -- '--si-[a-z0-9-]+' docs/index.html | sort -u); do + if ! grep -qE -- "^[[:space:]]*${name}[[:space:]]*:" docs/tokens.css; then + echo "Undefined design token referenced in docs/index.html: $name" + missing=1 + fi + done + exit $missing diff --git a/README.md b/README.md index 7603035..1293a34 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,19 @@ OpenAPI 3.0 specifications for the Smile Identity v3 API. Rendered API documentation is available via [GitHub Pages](https://smileidentity.github.io/api-reference/). +The page is styled with the Smile ID design system. `docs/tokens.css` is a verbatim copy of that +system's generated `dist/css/tokens.css` — don't hand-edit it. To refresh it, copy the file across +again and record the source revision below. Its own header refers to a `tokens/` directory and a +build command that belong to the design system repo, not this one. + +| | | +|---|---| +| Copied from | Smile ID design system, `dist/css/tokens.css` | +| Copied on | 25 July 2026 | + +CI checks that every `--si-*` token `docs/index.html` references is defined in `docs/tokens.css`, so +a rename in a refreshed copy fails the build rather than silently unstyling the page. + ## Using the Specs ### Import into Postman diff --git a/docs/index.html b/docs/index.html index d022008..2349d67 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,37 +5,40 @@