@@ -8,7 +8,7 @@ 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 auth4genai/ and main/
1212# - Respects .lycheeignore in the repo root
1313# - Accepts 302 redirects and 429 rate limits as valid
1414# - Currently warns on failures instead of failing CI
2222
2323jobs :
2424 link-check :
25- name : Check external links in auth4genai docs
25+ name : Check external links in ${{ matrix.site.name }} docs
2626 runs-on : ubuntu-latest
2727
28+ strategy :
29+ fail-fast : false
30+ matrix :
31+ site :
32+ - name : auth4genai
33+ path : auth4genai
34+ - name : main
35+ path : main
36+
2837 steps :
2938 # Fetch repository contents so Lychee can scan Markdown / MDX files
3039 - name : Checkout repo
3140 uses : actions/checkout@v4
3241
33- # Run Lychee on the Auth0 for AI Agents Mintlify content
42+ # Run Lychee on the current docs tree from the matrix
3443 #
3544 # Notes on args:
3645 # - --scheme https
@@ -39,43 +48,14 @@ jobs:
3948 # Treat 2xx, 302, and 429 as success. 302 is common for docs redirects,
4049 # 429 is rate limiting that we do not want to treat as "broken".
4150 # - --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 .
51+ # Skip the .vale directory used for prose linting (if present) .
52+ # - ${{ matrix.site.path }} /**/*.md / .mdx
53+ # Scope to the docs in the current tree (auth4genai/ or main/) .
4554 #
4655 # Internal routing, API-only endpoints, and other noisy URLs are
4756 # 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
57+ - name : Run Lychee on ${{ matrix.site.name }} docs
58+ id : lychee
7959 uses : lycheeverse/lychee-action@v2
8060 env :
8161 # Used by Lychee for authenticated GitHub requests to reduce rate limiting.
@@ -86,21 +66,19 @@ jobs:
8666 --no-progress
8767 --scheme https
8868 --accept 200..=299,302,429
89- main/**/*.md
90- main/**/*.mdx
69+ --exclude-path .vale
70+ ${{ matrix.site.path }}/**/*.md
71+ ${{ matrix.site.path }}/**/*.mdx
9172
9273 # For now, only warn on failures so you can tune .lycheeignore and fix
9374 # obvious issues without blocking merges.
9475 #
9576 # Once you are happy with the signal/noise ratio, delete this step so that
9677 # Lychee's non-zero exit code will fail the job.
9778 - 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)
79+ if : steps.lychee.outputs.exit_code != 0
10180 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 }}"
81+ echo "Lychee found broken links in ${{ matrix.site.name }} docs."
82+ echo "Exit code: ${{ steps.lychee.outputs.exit_code }}"
10583 echo "Check the Lychee step logs above for details."
10684 exit 0
0 commit comments