Skip to content

Commit 43ee4f2

Browse files
authored
check for broken links in README (#138)
1 parent 3b41f59 commit 43ee4f2

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.broken-link-config.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "localhost:"
5+
},
6+
{
7+
"pattern": "/pom.xml"
8+
},
9+
{
10+
"pattern": "https://www.linkedin.com/*"
11+
}
12+
]
13+
}

.github/workflows/broken-links.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Check for broken links
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: '0 5 * * SUN'
7+
8+
jobs:
9+
broken-link-check:
10+
runs-on: ubuntu-20.04
11+
name: Check for broken links in README.md
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16
20+
21+
- name: Check for broken links
22+
run: |
23+
npm install -g markdown-link-check
24+
find README.md -type f | xargs -L1 npx markdown-link-check -c .broken-link-config.json --quiet

0 commit comments

Comments
 (0)