-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (44 loc) · 1.63 KB
/
Copy pathdocs-check.yml
File metadata and controls
51 lines (44 loc) · 1.63 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
name: docs-check
on:
pull_request:
paths:
- "docs-mkdocs/**"
- "mkdocs.yml"
- "docs/requirements-mkdocs.txt"
workflow_dispatch:
jobs:
build-strict:
name: MkDocs strict build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install docs dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs-mkdocs/requirements-mkdocs.txt
- name: Build (strict — treats warnings as errors)
run: mkdocs build --strict
link-check:
name: External link checker
runs-on: ubuntu-latest
needs: build-strict
steps:
- uses: actions/checkout@v4
- name: Lychee link check
uses: lycheeverse/lychee-action@v2
with:
# Check all markdown in docs-mkdocs/
args: >-
--verbose --accept 200..=204,429 --no-progress --exclude-path
docs-mkdocs/climate-data-interface/processors/TEMPLATE.md
--exclude "https://mybinder.org" --exclude
"https://cal-adapt.github.io/climakitae" --exclude
"https://github.com/cal-adapt/climakitae/blob" --exclude
"https://www.ipcc.ch/"
"docs-mkdocs/**/*.md"
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GH_LINK_CHECKER_PAT }}