Skip to content

Commit ff5ed6f

Browse files
authored
Lychee quality-of-life improvements (#2116)
1 parent 708d9a9 commit ff5ed6f

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.github/workflows/linkcheck-pr.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,35 @@ jobs:
168168
core.warning(`Unsupported event type: ${context.eventName}`);
169169
return null;
170170
171+
- name: Debug - Show lychee config being used
172+
if: |
173+
steps.pr-context.outputs.pr_closed != 'true' &&
174+
((github.event_name == 'pull_request' &&
175+
github.event.pull_request.head.repo.fork == true &&
176+
steps.fork-docs-check.outputs.any_changed == 'true') ||
177+
(github.event_name == 'deployment_status' &&
178+
steps.changed-files.outputs.any_changed == 'true') ||
179+
github.event_name == 'workflow_dispatch')
180+
run: |
181+
echo "=== Lychee Configuration Debug ==="
182+
echo "Working directory: $(pwd)"
183+
echo "Git HEAD commit: $(git rev-parse HEAD)"
184+
echo "Git branch: $(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo 'detached HEAD')"
185+
echo ""
186+
if [ -f "lychee.toml" ]; then
187+
echo "✓ lychee.toml found in working directory"
188+
echo "Last modified by commit: $(git log -1 --format='%H %ai %s' -- lychee.toml)"
189+
echo ""
190+
echo "=== Current verbosity setting ==="
191+
grep "^verbose = " lychee.toml || echo "No verbose setting found"
192+
echo ""
193+
echo "=== Last 5 exclude patterns ==="
194+
grep -A 25 "^exclude = " lychee.toml | tail -6
195+
else
196+
echo "✗ lychee.toml not found in working directory!"
197+
fi
198+
echo "=================================="
199+
171200
- name: Link Checker
172201
id: lychee
173202
# Run if:
@@ -195,6 +224,7 @@ jobs:
195224
# Same-repo PRs: Wait for deployment and use preview URL
196225
# Fork PRs: Run immediately and check against production (no preview available)
197226
args: >-
227+
--config lychee.toml
198228
--base-url ${{ steps.pr-context.outputs.deploy_url || 'https://docs.wandb.ai' }}
199229
${{ steps.fork-docs-check.outputs.all_changed_files || steps.changed-files.outputs.all_changed_files || '.' }}
200230

.github/workflows/linkcheck-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
# Configuration is in lychee.toml
3636
# Check all URLs from sitemap
37-
args: "urls.txt"
37+
args: "--config lychee.toml urls.txt"
3838
output: ./lychee-report.md
3939
format: markdown
4040
fail: false

lychee.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include = [
3636
]
3737

3838
# Logging verbosity
39-
verbose = "info"
39+
verbose = "warn"
4040

4141
# URL patterns to exclude from checking
4242
exclude = [
@@ -56,6 +56,7 @@ exclude = [
5656
# Third party URLs
5757
'https://auth0.com/docs',
5858
'https://cognito-idp.us-east-1.amazonaws.com',
59+
'https://www.netapp.com',
5960
'https://portal.azure.com',
6061
'https://hhs.gov',
6162

0 commit comments

Comments
 (0)