-
Notifications
You must be signed in to change notification settings - Fork 27.8k
62 lines (54 loc) · 1.37 KB
/
link-check.yml
File metadata and controls
62 lines (54 loc) · 1.37 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Link Check
on:
# Run on PRs that touch the list
pull_request:
paths:
- "README.md"
# Run on pushes to master
push:
branches:
- master
paths:
- "README.md"
# Weekly scan (Sunday 06:00 UTC)
schedule:
- cron: "0 6 * * 0"
# Manual trigger
workflow_dispatch:
jobs:
link-check:
name: Check Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore link cache
id: restore-cache
uses: actions/cache/restore@v4
with:
path: .lycheecache
key: lychee-cache-${{ github.sha }}
restore-keys: lychee-cache-
- name: Check links in README.md
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: >-
--verbose
--no-progress
--cache
--max-cache-age 3d
--max-retries 3
--retry-wait-time 5
--max-concurrency 10
--timeout 30
--user-agent "Mozilla/5.0 (compatible; awesome-python-link-checker)"
'./README.md'
token: ${{ secrets.GITHUB_TOKEN }}
fail: true
- name: Save link cache
uses: actions/cache/save@v4
if: always()
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}