File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Links In Public Directory
2
+
3
+ on :
4
+ pull_request :
5
+ schedule :
6
+ - cron : " 0 0 1 * *" # Monthly run on the 1st day of every month at midnight UTC
7
+ workflow_dispatch :
8
+
9
+ concurrency :
10
+ group : ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress : true
12
+
13
+ jobs :
14
+ check-links :
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - name : Clone repository
19
+ uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 0
22
+ ref : dev
23
+
24
+ - name : Check links in /public
25
+ uses : lycheeverse/lychee-action@v2
26
+ with :
27
+ args : |
28
+ public/
29
+ --quiet
30
+ --max-retries 1
31
+ --accept 200,429,403
32
+ --exclude-all-private
33
+ --exclude '^file://'
34
+ --exclude "ethereum\.org"
35
+ --include '^https?://'
36
+ --format detailed
37
+ './**/*.md'
38
+ './**/*.html'
39
+ output : ./lychee-report.txt
40
+ continue-on-error : true
41
+
42
+ # looks like we dont need to do this?
43
+ # - name: Add Lychee Report to Job Summary
44
+ # if: always()
45
+ # run: |
46
+ # echo "### Lychee Report" >> $GITHUB_STEP_SUMMARY
47
+ # echo '```' >> $GITHUB_STEP_SUMMARY
48
+ # cat ./lychee-report.txt >> $GITHUB_STEP_SUMMARY
49
+ # echo '```' >> $GITHUB_STEP_SUMMARY
50
+
51
+ - name : Provide helpful failure message
52
+ if : failure()
53
+ run : |
54
+ echo "::error::Link check failed! Please review the broken links reported above."
55
+ echo ""
56
+ echo "If certain links are valid but fail due to:"
57
+ echo "- CAPTCHA challenges"
58
+ echo "- IP blocking"
59
+ echo "- Authentication requirements"
60
+ echo "- Rate limiting"
61
+ echo ""
62
+ echo "Consider adding them to .lycheeignore to bypass future checks."
63
+ echo "Format: Add one URL pattern per line"
64
+ exit 1
You can’t perform that action at this time.
0 commit comments