Repository navigation
55 lines (46 loc) · 1.85 KB
/
Copy pathlink-check.yml
File metadata and controls
55 lines (46 loc) · 1.85 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
name: Link check
# External links in the built docs site and the repository's own Markdown.
# Pull requests check internal links and anchors offline (ci.yml). External
# targets break without a commit here, so this runs on a schedule instead of
# gating a pull request. A failure lists each broken link in the job summary.
on:
schedule:
- cron: '0 10 * * 1' # Every Monday 10 AM UTC
workflow_dispatch:
permissions:
contents: read
concurrency:
group: link-check
cancel-in-progress: true
jobs:
external:
name: External links
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: true
- name: Install locked dependencies
run: uv sync --locked --extra dev
- name: Build the site
run: uv run mkdocs build --strict
# 403 and 429 count as reachable: some sites refuse automated clients,
# and GitHub rate-limits. app. and api.openadapt.ai need a session.
- name: Check external links
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: >-
--no-progress --max-concurrency 8 --timeout 30 --max-retries 3
--accept '200..=299,403,429'
--exclude '^https?://(localhost|127\.0\.0\.1|0\.0\.0\.0)'
--exclude '^https://(app|api)\.openadapt\.ai'
--exclude 'linkedin\.com'
--root-dir ${{ github.workspace }}/site --index-files index.html
'site/**/*.html' README.md CONTRIBUTING.md SECURITY.md