Skip to content

Commit b86ba69

Browse files
ci: 缓存链接检查结果
复制自 BITNP/BIThesis-wiki#460
1 parent b7a9dbd commit b86ba69

File tree

4 files changed

+30
-38
lines changed

4 files changed

+30
-38
lines changed

.github/lychee.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cache = true
2+
max_cache_age = "30 days"
3+
4+
max_retries = 5
5+
retry_wait_time = 30 # seconds
6+
7+
exclude = [
8+
'^https://(grd|jwb|mirrors|cs)\.bit\.edu\.cn',
9+
'^https://tex\.stackexchange\.com',
10+
'^https://www\.tablesgenerator\.com',
11+
'file://.*/bithesis\.pdf$', # Generated
12+
]

.github/workflows/test.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,21 @@ jobs:
2929
- name: Check spelling of bithesis.dtx
3030
uses: crate-ci/typos@master
3131

32-
markdown-link-check:
32+
check-links:
3333
runs-on: ubuntu-latest
3434
steps:
35-
- uses: actions/checkout@master
36-
- uses: gaurav-nelson/github-action-markdown-link-check@v1
35+
- uses: actions/checkout@v4
36+
- name: Restore the cache
37+
uses: actions/cache@v4
38+
with:
39+
path: .lycheecache
40+
key: lychee-${{ github.sha }}
41+
restore-keys: lychee-
42+
- name: Check links
43+
uses: lycheeverse/lychee-action@v2
44+
with:
45+
args: >-
46+
--verbose
47+
--no-progress
48+
--config .github/lychee.toml
49+
.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,5 @@ scripts/*
302302
.DS_Store
303303

304304
BIT-bithesis-graduates*
305+
306+
.lycheecache

mlc_config.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)