-
-
Notifications
You must be signed in to change notification settings - Fork 553
63 lines (58 loc) · 1.86 KB
/
lychee_url_checker.yml
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
name: Check URLs with Lychee
on:
push:
branches:
- main
- develop
pull_request:
schedule:
# Run everyday at 3 am UTC
- cron: "0 3 * * *"
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
# cache Lychee results to avoid hitting rate limits
- name: Restore lychee cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
# check URLs with Lychee
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# use stable version for now to avoid breaking changes
- name: Lychee URL checker
uses: lycheeverse/lychee-action@f81112d0d2814ded911bd23e3beaa9dda9093915 # v2.1.0
with:
# arguments with file types to check
args: >-
--cache
--no-progress
--max-cache-age 2d
--timeout 10
--max-retries 5
--skip-missing
--exclude-loopback
--exclude https://twitter.com/pybamm_
--exclude "https://doi\.org|www.sciencedirect\.com/*"
--exclude https://www.rse.ox.ac.uk
--accept 200,429
--exclude-path ./CHANGELOG.md
--exclude-path ./scripts/update_version.py
--exclude-path asv.conf.json
--exclude-path docs/conf.py
--exclude-path all_contributors.md
'./**/*.rst'
'./**/*.md'
'./**/*.py'
'./**/*.ipynb'
'./**/*.json'
'./**/*.toml'
# fail the action on broken links
fail: true
jobSummary: true
format: markdown
env:
# to be used in case rate limits are surpassed
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}