Skip to content

Commit 2009e18

Browse files
authored
Update MonthlyLinkCheck.yml
1 parent c65ea74 commit 2009e18

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/MonthlyLinkCheck.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,27 @@ jobs:
1818
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 1
21+
2122
- name: Check Links
2223
id: lychee
2324
uses: lycheeverse/lychee-action@v2
2425
with:
25-
args: --accept=200,403,429 --base $GITHUB_WORKSPACE --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'
26+
args: --accept=200,202,403,429 --base $GITHUB_WORKSPACE --no-progress './**/*.md' './**/*.html' './**/*.rst'
2627
token: ${{ secrets.CUSTOM_TOKEN }}
28+
jobSummary: false # Disable default summary
2729
fail: true
30+
31+
- name: Create Filtered Summary
32+
if: always()
33+
run: |
34+
if [ -f ./lychee/out.md ]; then
35+
echo "## Link Check Results (Errors Only)" >> $GITHUB_STEP_SUMMARY
36+
# Extract only error sections, skip redirects
37+
grep -A 10000 "^## Errors per input" ./lychee/out.md | \
38+
grep -B 10000 "^## Redirects per input" | \
39+
head -n -1 >> $GITHUB_STEP_SUMMARY || \
40+
grep -A 10000 "^## Errors per input" ./lychee/out.md >> $GITHUB_STEP_SUMMARY
41+
fi
2842
2943
- name: Create Issue From File
3044
if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')

0 commit comments

Comments
 (0)