@@ -8,7 +8,9 @@ name: Link Checker
88# - pushes to main
99# - all pull requests
1010# - manual runs via "Run workflow"
11- # - Scans auth4genai/*.md(x) for broken HTTPS links
11+ # - Scans Markdown / MDX files under:
12+ # - main/ (Mintlify site branded as "auth0")
13+ # - auth4genai/ (Mintlify site branded as "auth0-genai")
1214# - Respects .lycheeignore in the repo root
1315# - Accepts 302 redirects and 429 rate limits as valid
1416# - Currently warns on failures instead of failing CI
2224
2325jobs :
2426 link-check :
25- name : Check external links in auth4genai docs
27+ # This name becomes the check name in the GitHub UI.
28+ # Examples:
29+ # Link Checker (auth0) - link-rot
30+ # Link Checker (auth0-genai) - link-rot
31+ name : Link Checker (${{ matrix.site.name }}) - link-rot
2632 runs-on : ubuntu-latest
2733
34+ strategy :
35+ fail-fast : false
36+ matrix :
37+ site :
38+ # Main Auth0 docs (Mintlify project branded as "auth0")
39+ - name : auth0
40+ path : main
41+ # Auth0 for AI Agents docs (Mintlify project branded as "auth0-genai")
42+ - name : auth0-genai
43+ path : auth4genai
44+
2845 steps :
2946 # Fetch repository contents so Lychee can scan Markdown / MDX files
3047 - name : Checkout repo
3148 uses : actions/checkout@v4
3249
33- # Run Lychee on the Auth0 for AI Agents Mintlify content
50+ # Run Lychee on the current docs tree from the matrix.
3451 #
3552 # Notes on args:
3653 # - --scheme https
3754 # Only check HTTPS links. Other schemes (mailto:, file:, etc) are skipped.
3855 # - --accept 200..=299,302,429
39- # Treat 2xx, 302, and 429 as success. 302 is common for docs redirects,
40- # 429 is rate limiting that we do not want to treat as "broken".
41- # - --exclude-path '.vale'
42- # Skip the .vale directory used for prose linting.
43- # - auth4genai/**/*.md / .mdx
44- # Scope to the Mintlify site for Auth0 for AI Agents.
56+ # Treat 2xx, 302, and 429 as success.
57+ # - 302 is common for docs redirects.
58+ # - 429 is rate limiting that we do not want to treat as "broken".
59+ # - --exclude-path .vale
60+ # Skip the .vale directory used for prose linting (if present).
61+ # - ${{ matrix.site.path }}/**/*.md / .mdx
62+ # Scope to the docs in the current tree:
63+ # - main/ when name == auth0
64+ # - auth4genai/ when name == auth0-genai
4565 #
4666 # Internal routing, API-only endpoints, and other noisy URLs are
4767 # filtered via .lycheeignore in the repo root.
48- - name : Run Lychee on auth4genai docs
49- id : lychee-auth4genai
50- uses : lycheeverse/lychee-action@v2
51- env :
52- # Used by Lychee for authenticated GitHub requests to reduce rate limiting.
53- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54- with :
55- args : >
56- --verbose
57- --no-progress
58- --scheme https
59- --accept 200..=299,302,429
60- --exclude-path '.vale'
61- auth4genai/**/*.md
62- auth4genai/**/*.mdx
63-
64- # Run Lychee on the main Auth0 Docs content
65- #
66- # Notes on args:
67- # - --scheme https
68- # Only check HTTPS links. Other schemes (mailto:, file:, etc) are skipped.
69- # - --accept 200..=299,302,429
70- # Treat 2xx, 302, and 429 as success. 302 is common for docs redirects,
71- # 429 is rate limiting that we do not want to treat as "broken".
72- # - main/**/*.md / .mdx
73- # Scope to the legacy/main docs content in this repo.
74- #
75- # As with auth4genai, internal routes and noisy endpoints are excluded
76- # via .lycheeignore at the repo root.
77- - name : Run Lychee on main docs
78- id : lychee-main
68+ - name : Run Lychee on ${{ matrix.site.name }} docs
69+ id : lychee
7970 uses : lycheeverse/lychee-action@v2
8071 env :
8172 # Used by Lychee for authenticated GitHub requests to reduce rate limiting.
@@ -86,21 +77,19 @@ jobs:
8677 --no-progress
8778 --scheme https
8879 --accept 200..=299,302,429
89- main/**/*.md
90- main/**/*.mdx
80+ --exclude-path .vale
81+ ${{ matrix.site.path }}/**/*.md
82+ ${{ matrix.site.path }}/**/*.mdx
9183
9284 # For now, only warn on failures so you can tune .lycheeignore and fix
9385 # obvious issues without blocking merges.
9486 #
9587 # Once you are happy with the signal/noise ratio, delete this step so that
9688 # Lychee's non-zero exit code will fail the job.
9789 - name : Warn on failures instead of failing CI
98- if : >
99- (steps.lychee-auth4genai.outputs.exit_code != 0) ||
100- (steps.lychee-main.outputs.exit_code != 0)
90+ if : steps.lychee.outputs.exit_code != 0
10191 run : |
102- echo "Lychee found broken links."
103- echo "Auth4GenAI exit code: ${{ steps.lychee-auth4genai.outputs.exit_code }}"
104- echo "Main docs exit code: ${{ steps.lychee-main.outputs.exit_code }}"
92+ echo "Lychee found broken links in ${{ matrix.site.name }} docs."
93+ echo "Exit code: ${{ steps.lychee.outputs.exit_code }}"
10594 echo "Check the Lychee step logs above for details."
10695 exit 0
0 commit comments