-
Notifications
You must be signed in to change notification settings - Fork 139
48 lines (42 loc) · 1.27 KB
/
validate-links-on-push-pr.yml
File metadata and controls
48 lines (42 loc) · 1.27 KB
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
43
44
45
46
47
48
name: Validate links on push + PR
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
lychee:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
- name: Restore lychee cache
id: restore-cache
uses: actions/cache/restore@v5.0.4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Validate links
uses: lycheeverse/lychee-action@v2.8.0
with:
# Check all MD files, ignore ok/redir/blocked/rate-limited, exclude commonly down domains
args: >-
"*.md" "**/*.md"
--verbose --no-progress --include-mail
--include-fragments --index-files README.md --exclude "#readme"
--accept 200..299,300..399,403,429
--cache --max-cache-age 3d
--exclude api\.star-history\.com --exclude ghostbrowser\.com
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Save lychee cache
uses: actions/cache/save@v5.0.4
if: always()
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}