Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit a5114b8

Browse files
mysteryvenBoshen
authored andcommitted
chore(ci): add link check
1 parent 16a9bf8 commit a5114b8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/link-check.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check Links
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**/*.md'
9+
pull_request:
10+
types: [opened, synchronize]
11+
paths:
12+
- '**/*.md'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
check-links:
20+
name: Check Links
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Check Links
27+
uses: lycheeverse/lychee-action@master
28+
with:
29+
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
30+
# Accept 429 for now due to GitHub rate limit.
31+
# See https://github.com/lycheeverse/lychee/issues/634
32+
# Exclude twitter links, see https://github.com/lycheeverse/lychee/issues/1108.
33+
# Ideally this is built in, by https://github.com/lycheeverse/lychee/pull/1147.
34+
# Not sure why it doesn't work, exclude it manually.
35+
args: --accept 200,429 --verbose --no-progress --exclude 'https://twitter\.com/*' .
36+
# Fail action on broken links
37+
fail: true

0 commit comments

Comments
 (0)