ci(docs): isolate mintlify so broken-link CI survives the monorepo

Hoisted mintlify crashes with a React invalid-hook-call. Run it via
isolated bunx, and only on docs changes.
This commit is contained in:
James Yang 2026-09-02 19:50:08 -04:00
parent dac01ca930
commit 3e8372d073
2 changed files with 13 additions and 2 deletions

View file

@ -107,8 +107,19 @@ jobs:
- name: Run Biome CI (format & lint on changed files)
run: bunx biome ci --changed --since=origin/main --no-errors-on-unmatched
# mintlify@4.2.x may exit 0 even when it prints broken links
- name: Detect docs changes
id: docs-changes
run: |
if git diff --quiet "${{ github.event.pull_request.base.sha }}" HEAD -- apps/docs; then
echo "docs=false" >> "$GITHUB_OUTPUT"
else
echo "docs=true" >> "$GITHUB_OUTPUT"
fi
# Isolated bunx avoids the monorepo React/ink hook crash from hoisted mintlify.
# mintlify@4.2.x may exit 0 even when it prints broken links.
- name: Check docs for broken internal links
if: steps.docs-changes.outputs.docs == 'true'
working-directory: apps/docs
run: |
set -o pipefail

View file

@ -7,7 +7,7 @@
"scripts": {
"dev": "portless",
"dev:app": "bunx mintlify@latest dev --no-open --port 3003",
"check-links": "mintlify broken-links"
"check-links": "bunx --bun mintlify@4.2.112 broken-links"
},
"devDependencies": {
"@types/bun": "latest",