Skip to content

Commit 2e1c33e

Browse files
authored
Add link checker workflow to GitHub Actions
1 parent 21ffd03 commit 2e1c33e

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/link-checker.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check Links
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 8 * * 1'
10+
11+
jobs:
12+
linkChecker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Link Checker
18+
id: lychee
19+
uses: lycheeverse/lychee-action@v2
20+
with:
21+
fail: false
22+
args: >-
23+
--verbose
24+
--no-progress
25+
--accept 200,204,301,302,403,429
26+
--timeout 30
27+
--max-retries 3
28+
--exclude-loopback
29+
--exclude "linkedin.com"
30+
--exclude "twitter.com"
31+
--exclude "x.com"
32+
'*.md'
33+
34+
- name: Create Issue From Lychee Output
35+
if: steps.lychee.outputs.exit_code != 0
36+
uses: peter-evans/create-issue-from-file@v5
37+
with:
38+
title: "🔗 Link Checker Report"
39+
content-filepath: ./lychee/out.md
40+
labels: broken-link, automated

0 commit comments

Comments
 (0)