Skip to content

Commit a3ba701

Browse files
committed
Add workflow using lychee to ensure that links in documentation files resolve
Signed-off-by: Craig Perkins <[email protected]>
1 parent 391fe2f commit a3ba701

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/link-checker.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Link Checker
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
linkchecker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: lychee Link Checker
14+
id: lychee
15+
uses: lycheeverse/lychee-action@master
16+
with:
17+
args: --accept=200,403,429 **/*.html **/*.md **/*.txt **/*.json
18+
env:
19+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
- name: Fail if there were link errors
21+
run: exit ${{ steps.lychee.outputs.exit_code }}

0 commit comments

Comments
 (0)