mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
* fix(ci): pin and reuse the docs validation CLI * fix(ci): pin and reuse the docs validation CLI
71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
name: Docs
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Suppress hyperframes CLI telemetry from HeyGen's own CI runs.
|
|
# External users' CI continues to emit telemetry unless they set this themselves.
|
|
env:
|
|
HYPERFRAMES_NO_TELEMETRY: "1"
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- ".github/workflows/docs.yml"
|
|
- "docs/**"
|
|
- "DOCS_GUIDELINES.md"
|
|
- "packages/core/schemas/**"
|
|
- "scripts/sync-schemas.ts"
|
|
# A new CLI command must be listed in the docs (check-docs-cli-commands.mjs).
|
|
- "packages/cli/src/cli.ts"
|
|
- "scripts/check-docs-cli-commands.mjs"
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- ".github/workflows/docs.yml"
|
|
- "docs/**"
|
|
- "DOCS_GUIDELINES.md"
|
|
- "packages/core/schemas/**"
|
|
- "scripts/sync-schemas.ts"
|
|
# A new CLI command must be listed in the docs (check-docs-cli-commands.mjs).
|
|
- "packages/cli/src/cli.ts"
|
|
- "scripts/check-docs-cli-commands.mjs"
|
|
|
|
concurrency:
|
|
group: docs-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate docs
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Check schema mirror (core → docs)
|
|
run: npx tsx scripts/sync-schemas.ts --check
|
|
|
|
- name: Check every CLI command is listed in the docs
|
|
run: node scripts/check-docs-cli-commands.mjs
|
|
|
|
- name: Install Mint CLI
|
|
run: |
|
|
npm install --prefix "$RUNNER_TEMP/mint-cli" --no-save --no-package-lock mint@4.2.1096
|
|
echo "$RUNNER_TEMP/mint-cli/node_modules/.bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Validate build
|
|
working-directory: docs
|
|
run: mint validate
|
|
|
|
- name: Check broken links
|
|
working-directory: docs
|
|
# --check-redirects also resolves every redirect destination, so a
|
|
# restructure cannot leave a redirect pointing at a page it removed.
|
|
run: mint broken-links --check-redirects
|