File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ include_fragments = true
2+
3+ accept = [" 200..=299" , " 429" ]
4+
5+ exclude = [
6+ " ^http(s)?://localhost" ,
7+ " ^http(s)?://example.com"
8+ ]
Original file line number Diff line number Diff line change 1+ name : check-links
2+ on :
3+ push :
4+ branches : [main]
5+ pull_request :
6+ merge_group :
7+ types : [checks_requested]
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref_name }}
11+ cancel-in-progress : true
12+
13+ permissions : read-all
14+
15+ jobs :
16+ changedfiles :
17+ name : changed files
18+ runs-on : ubuntu-latest
19+ env :
20+ PR_HEAD : ${{ github.event.pull_request.head.sha }}
21+ outputs :
22+ files : ${{ steps.changes.outputs.files }}
23+ steps :
24+ - name : Checkout Repo
25+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+ with :
27+ fetch-depth : 0
28+ - name : Get changed files
29+ id : changes
30+ run : |
31+ files=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep .md$ | xargs)
32+ echo "files=$files" >> $GITHUB_OUTPUT
33+ check-links :
34+ runs-on : ubuntu-latest
35+ needs : changedfiles
36+ if : ${{needs.changedfiles.outputs.files}}
37+ steps :
38+ - name : Checkout Repo
39+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40+ with :
41+ fetch-depth : 0
42+
43+ - name : Link Checker
44+ id : lychee
45+ uses : lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
46+ with :
47+ args : " --verbose --no-progress ${{needs.changedfiles.outputs.files}} --config .github/lychee.toml"
48+ failIfEmpty : false
You can’t perform that action at this time.
0 commit comments