62 lines
2.1 KiB
YAML
62 lines
2.1 KiB
YAML
name: Docs Site Checks
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
docs-site-checks:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@f548e57e544e1ff5a4c46bf1e1b8685f8e4a348a # v7.0.1
|
|
|
|
- name: Set up the locked site toolchain
|
|
uses: ./.github/actions/setup-pm
|
|
with:
|
|
toolchain: all
|
|
node-cache-dependency-path: website/package-lock.json
|
|
|
|
- name: Install website dependencies
|
|
uses: ./.github/actions/retry
|
|
with:
|
|
command: npm ci
|
|
working-directory: website
|
|
|
|
- name: Install ascii-guard
|
|
uses: ./.github/actions/retry
|
|
with:
|
|
command: python -m scripts.ci.python_packages ascii-guard==2.3.0 ruamel.yaml==0.18.17
|
|
|
|
- name: Extract skill metadata for dashboard
|
|
run: python3 website/scripts/extract-skills.py
|
|
|
|
- name: Regenerate per-skill docs pages + catalogs
|
|
run: python3 website/scripts/generate-skill-docs.py
|
|
|
|
- name: Committed skill docs match the generator
|
|
# GitHub renders the committed copies, so a regeneration that changes anything
|
|
# means the published catalogs/pages are stale. Fix: run the generator and commit.
|
|
run: |
|
|
git add -N website/docs website/sidebars.ts
|
|
if ! git diff --exit-code --stat -- website/docs website/sidebars.ts website/i18n; then
|
|
echo "::error::website/scripts/generate-skill-docs.py output differs from the committed docs; run it and commit the result"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Check cross-page links resolve on GitHub and on the site
|
|
run: python3 website/scripts/check_doc_links.py
|
|
|
|
- name: Lint docs diagrams
|
|
run: npm run lint:diagrams
|
|
working-directory: website
|
|
|
|
- name: Build Docusaurus
|
|
# Build only the default (en) locale in CI — the full bilingual
|
|
# build runs in deploy-site.yml on push-to-main / release.
|
|
# Same pattern Docusaurus uses internally (build:fast --locale en).
|
|
run: npm run build:fast
|
|
working-directory: website
|