File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed 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
+
7
+ jobs :
8
+ changedfiles :
9
+ name : changed files
10
+ runs-on : ubuntu-latest
11
+ if : ${{ github.actor != 'dependabot[bot]' }}
12
+ outputs :
13
+ md : ${{ steps.changes.outputs.md }}
14
+ steps :
15
+ - name : Checkout Repo
16
+ uses : actions/checkout@v3
17
+ with :
18
+ fetch-depth : 0
19
+ - name : Get changed files
20
+ id : changes
21
+ run : |
22
+ echo "::set-output name=md::$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)"
23
+ check-links :
24
+ runs-on : ubuntu-latest
25
+ needs : changedfiles
26
+ if : ${{needs.changedfiles.outputs.md}}
27
+ steps :
28
+ - name : Checkout Repo
29
+ uses : actions/checkout@v3
30
+ with :
31
+ fetch-depth : 0
32
+
33
+ - name : Install markdown-link-check
34
+ run : npm install -g markdown-link-check
35
+
36
+ - name : Run markdown-link-check
37
+ run : |
38
+ markdown-link-check \
39
+ --verbose \
40
+ --config .github/workflows/check_links_config.json \
41
+ ${{needs.changedfiles.outputs.md}} \
42
+ || { echo "Check that anchor links are lowercase"; exit 1; }
Original file line number Diff line number Diff line change
1
+ {
2
+ "ignorePatterns" : [
3
+ {
4
+ "pattern" : " http(s)?://\\ d+\\ .\\ d+\\ .\\ d+\\ .\\ d+"
5
+ },
6
+ {
7
+ "pattern" : " http(s)?://localhost"
8
+ },
9
+ {
10
+ "pattern" : " http(s)?://example.com"
11
+ }
12
+ ],
13
+ "aliveStatusCodes" : [429 , 200 ]
14
+ }
You can’t perform that action at this time.
0 commit comments