-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.85 KB
/
Copy pathcheck.yml
File metadata and controls
50 lines (41 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: check
# Gate for the docs site. Mintlify deploys this repo on push to main, so this is
# the only thing standing between a bad commit and a broken production docs site.
# Runs on PRs (the merge gate) and on push to main (a post-merge alarm).
on:
pull_request:
push:
branches: [main]
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# 1. Cheap structural guard: every openapi nav group must have a `pages`
# key (dropping it 404s the whole API Reference - incident 2026-07-08).
- name: docs.json nav guard
run: bash scripts/check-docs-nav.sh
# 2. Agent contract guard: the docs root must direct generated integrations
# to each SKU's schema and must not claim that common input fields are universal.
- name: agent contract guard
run: bash scripts/check-agent-contract.sh
- uses: actions/setup-node@v4
with:
node-version: 22
- name: install Mintlify CLI
run: npm install -g mint
# 3. Strict build validation (the Mintlify-supported CI command): fails on
# any build warning/error - invalid MDX, bad refs, broken openapi.
# Runs headless (no browser, no dev server, stdin closed) and uses the
# latest client so it matches what the cloud build runs.
# Note: `validate` does NOT catch a dropped API Reference nav group (the
# CLI generates it regardless); the nav guard above is what enforces
# that. `validate` covers the rest of the content-integrity surface.
- name: mint validate (strict build)
run: mint validate --telemetry false < /dev/null
# 4. Link integrity across the whole generated site.
- name: broken links
run: mint broken-links --telemetry false < /dev/null