Repository navigation
55 lines (48 loc) · 1.65 KB
/
Copy pathcheck_links.yml
File metadata and controls
55 lines (48 loc) · 1.65 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: "Check links"
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "37 11 * * 2"
permissions:
contents: read
jobs:
links:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Python and just
uses: opensafely-core/setup-action@1f93a08c6e31a75b0908fcac5d25c2cf729c31f2 # v1.8.0
with:
install-just: true
python-version: "3.11"
- name: Build site
env:
AccessToken: ${{ secrets.GITHUB_TOKEN }}
MKDOCS_SITE_URL: https://docs.opensafely.org
EHRQL_BRANCH: main
run: just build
- name: Move imported documentation to correct relative path
run: mv imported_docs/* docs/
# Use --max-concurrency to prevent 429 errors with OpenSAFELY Jobs.
# This workaround may not be needed in future if lychee has better rate limiting.
# https://github.com/lycheeverse/lychee/issues/36
- name: Check links
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args:
"--accept '100..=103,200..=299,429,500..=511'
--exclude-all-private
--exclude-path 'docs/ehrql/includes/generated_docs'
--include-verbatim
--max-concurrency 24
--no-progress
--offline
--require-https
--root-dir '${{ github.workspace }}/site'
--timeout 60
--verbose
'./docs/**/*.md' './docs/**/*.html'"