Skip to content

Commit ab18feb

Browse files
committed
[skip changelog] Add task and workflow to check for dead links in docs
1 parent eef3705 commit ab18feb

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Verifies documentation links
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
schedule:
9+
- cron: "0 3 * * 1" # Every Monday at 03:00
10+
11+
jobs:
12+
verify-links:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install Taskfile
20+
uses: Arduino/actions/setup-taskfile@master
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Verify links
25+
run: task docs:check-links

Taskfile.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ tasks:
5454
cmds:
5555
- npx {{ .PRETTIER }} --check "**/*.md"
5656

57+
docs:check-links:
58+
desc: Verifies there are no dead links in documentation
59+
dir: docs
60+
cmds:
61+
- npx -p markdown-link-check -c 'for file in **/*.md; do markdown-link-check -q "$file"; done'
62+
5763
docs:format:
5864
desc: Automatically formats documentation
5965
cmds:

0 commit comments

Comments
 (0)