From 3e8372d0732cd5fab410853f147da7b82bfbfd70 Mon Sep 17 00:00:00 2001 From: James Yang Date: Wed, 2 Sep 2026 19:50:08 -0400 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 13 ++++++++++++- apps/docs/package.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72acc779..0dc1a059 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/apps/docs/package.json b/apps/docs/package.json index e443f967..e42425a9 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -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",