Skip to content

Commit f4bca78

Browse files
committed
fix: add main
1 parent 538f06e commit f4bca78

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

.github/workflows/link-check.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,32 +61,46 @@ jobs:
6161
auth4genai/**/*.md
6262
auth4genai/**/*.mdx
6363
64-
# Optional: example of how you might later add main docs checking.
65-
# Uncomment and adjust when you want to bring main/ back into scope.
64+
# Run Lychee on the main Auth0 Docs content
6665
#
67-
# - name: Run Lychee on main docs
68-
# id: lychee-main
69-
# uses: lycheeverse/lychee-action@v2
70-
# env:
71-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
# with:
73-
# args: >
74-
# --verbose
75-
# --no-progress
76-
# --scheme https
77-
# --accept 200..=299,302,429
78-
# main/**/*.md
79-
# main/**/*.mdx
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
79+
uses: lycheeverse/lychee-action@v2
80+
env:
81+
# Used by Lychee for authenticated GitHub requests to reduce rate limiting.
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
args: >
85+
--verbose
86+
--no-progress
87+
--scheme https
88+
--accept 200..=299,302,429
89+
main/**/*.md
90+
main/**/*.mdx
8091
8192
# For now, only warn on failures so you can tune .lycheeignore and fix
8293
# obvious issues without blocking merges.
8394
#
8495
# Once you are happy with the signal/noise ratio, delete this step so that
8596
# Lychee's non-zero exit code will fail the job.
8697
- name: Warn on failures instead of failing CI
87-
if: steps.lychee-auth4genai.outputs.exit_code != 0
98+
if: >
99+
(steps.lychee-auth4genai.outputs.exit_code != 0) ||
100+
(steps.lychee-main.outputs.exit_code != 0)
88101
run: |
89-
echo "Lychee found broken links in auth4genai docs."
90-
echo "Auth4GenAI docs exit code: ${{ steps.lychee-auth4genai.outputs.exit_code }}"
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 }}"
91105
echo "Check the Lychee step logs above for details."
92106
exit 0

0 commit comments

Comments
 (0)