Skip to content

Commit 3f20765

Browse files
authored
Port Lychee link checker to user documentation (#531)
1 parent 11b5154 commit 3f20765

File tree

3 files changed

+45
-39
lines changed

3 files changed

+45
-39
lines changed

.github/workflows/check-links.yaml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
1-
name: Check Markdown links
1+
name: Check external href links in the documentation
22

33
on:
4+
push:
5+
paths:
6+
- '.github/workflows/check-links.yml'
7+
- '.lycheeignore'
8+
- 'lychee.toml'
9+
- '**/*.md'
10+
schedule:
11+
# Run on the first of each month at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
12+
- cron: "0 9 1 * *"
413
workflow_dispatch:
514

15+
concurrency:
16+
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
17+
cancel-in-progress: true
18+
619
jobs:
7-
markdown-link-check:
20+
lychee:
821
runs-on: ubuntu-latest
922
steps:
10-
- uses: actions/checkout@v2
11-
- uses: gaurav-nelson/github-action-markdown-link-check@v1
23+
- uses: actions/checkout@v4
24+
with:
25+
show-progress: 'false'
26+
- name: Restore lychee cache
27+
uses: actions/cache@v4
28+
with:
29+
path: .lycheecache
30+
key: cache-lychee-${{ github.sha }}
31+
restore-keys: cache-lychee-
32+
- name: Link Checker
33+
id: lychee
34+
uses: lycheeverse/[email protected]
1235
with:
13-
use-quiet-mode: 'yes'
14-
use-verbose-mode: 'no'
15-
config-file: 'mlc_config.json'
16-
folder-path: 'en'
36+
fail: true
37+
args: --accept '200,201,202,203,204,403,429,500' --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'

.lycheeignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
https://arxiv.org/
2+
https://chrome.google.com/
3+
https://contribute.jabref.org/
4+
https://donations.jabref.org/
5+
https://pubs.acs.org/
6+
https://scholar.archive.org/
7+
https://web.archive.org/
8+
https://www.researchgate.net/privacy-policy
9+
https://www.sciencedirect.com/
10+
11+
https://github.com/koppor/jabref/issue
12+
https://github.com/koppor/jabref/pull
13+
https://github.com/JabRef/jabref/issue
14+
https://github.com/JabRef/jabref/pull
15+
16+
0005-example.md

mlc_config.json

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

0 commit comments

Comments
 (0)