-
-
Notifications
You must be signed in to change notification settings - Fork 448
42 lines (38 loc) · 1.23 KB
/
link-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Check Links
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '**/*.md'
- '**/*.html'
- '!**/fixtures/**'
pull_request:
types: [opened, synchronize]
paths:
- '**/*.md'
- '**/*.html'
- '!**/fixtures/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
check-links:
name: Check Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: taiki-e/checkout-action@v1
- name: Check Links
uses: lycheeverse/lychee-action@master
with:
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
# Accept 429 for now due to GitHub rate limit.
# See https://github.com/lycheeverse/lychee/issues/634
# Exclude twitter links, see https://github.com/lycheeverse/lychee/issues/1108.
# Ideally this is built in, by https://github.com/lycheeverse/lychee/pull/1147.
# Not sure why it doesn't work, exclude it manually.
args: --accept 200,429 --verbose --no-progress --exclude 'https://twitter\.com/*' .
# Fail action on broken links
fail: true