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",