-
Notifications
You must be signed in to change notification settings - Fork 98
72 lines (67 loc) · 2.07 KB
/
Copy pathlink-check.yml
File metadata and controls
72 lines (67 loc) · 2.07 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
63
64
65
66
67
68
69
70
71
72
name: Link Check
on:
schedule:
# Every Monday 06:00 UTC
- cron: "0 6 * * 1"
workflow_dispatch:
push:
paths:
- "README.md"
- "README.zh-CN.md"
- "README.ja.md"
- ".github/workflows/link-check.yml"
- ".lycheeignore"
jobs:
link-check:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Run lychee
id: lychee
uses: lycheeverse/lychee-action@v2
with:
# Skip badge URLs and a few notoriously HEAD-blocking sites that 401/403 to scrapers but
# work fine in real browsers (OpenAI, X, Perplexity, government portals, etc.)
args: >-
--cache
--max-cache-age 14d
--accept "200,206,301,302,403,405,418,429,500,503"
--max-concurrency 8
--timeout 20
--retry-wait-time 5
--max-retries 2
--no-progress
--exclude-mail
--exclude "shields.io"
--exclude "img.shields.io"
--exclude "openai.com"
--exclude "x.ai"
--exclude "midjourney.com"
--exclude "perplexity.ai"
--exclude "samsung.com"
--exclude "tesla.com"
--exclude "claude.ai/security"
--exclude "researchgate.net"
--exclude "qwen.ai"
--exclude "sz.gov.cn"
--exclude "limitless.ai"
'./README.md' './README.zh-CN.md' './README.ja.md'
fail: false
output: ./lychee-report.md
- name: Create issue if links broke
if: env.lychee_exit_code != '0'
uses: peter-evans/create-issue-from-file@v5
with:
title: "🔗 Broken links detected (link-check job)"
content-filepath: ./lychee-report.md
labels: maintenance, broken-link