Skip to content

Commit c6a41cf

Browse files
authored
Update MonthlyLinkCheck.yml (#3637)
Resolving issue #3633 Workflow failing due to updates in lychee handling of relative links
1 parent d055ef6 commit c6a41cf

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/MonthlyLinkCheck.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,21 @@ jobs:
2222
id: lychee
2323
uses: lycheeverse/lychee-action@v2
2424
with:
25-
args: --accept=200,403,429 --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'
25+
args: --accept=200,202,403,429 --base $GITHUB_WORKSPACE --no-progress './**/*.md' './**/*.html' './**/*.rst'
2626
token: ${{ secrets.CUSTOM_TOKEN }}
27+
jobSummary: false # Disable default summary
2728
fail: true
28-
29+
- name: Create Filtered Summary
30+
if: always()
31+
run: |
32+
if [ -f ./lychee/out.md ]; then
33+
echo "## Link Check Results (Errors Only)" >> $GITHUB_STEP_SUMMARY
34+
# Extract only error sections, skip redirects
35+
grep -A 10000 "^## Errors per input" ./lychee/out.md | \
36+
grep -B 10000 "^## Redirects per input" | \
37+
head -n -1 >> $GITHUB_STEP_SUMMARY || \
38+
grep -A 10000 "^## Errors per input" ./lychee/out.md >> $GITHUB_STEP_SUMMARY
39+
fi
2940
- name: Create Issue From File
3041
if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
3142
uses: peter-evans/create-issue-from-file@v5

0 commit comments

Comments
 (0)