-
Notifications
You must be signed in to change notification settings - Fork 191
47 lines (38 loc) · 1.05 KB
/
docs-build.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
name: docs-build
on:
push:
branches-ignore: [gh-pages]
pull_request:
branches-ignore: [gh-pages]
paths: [docs/**]
env:
FORCE_COLOR: 1
jobs:
docs-linkcheck:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install aiida-core and docs deps
uses: ./.github/actions/install-aiida-core
with:
python-version: '3.9'
extras: '[docs,tests,rest,atomic_tools]'
from-requirements: 'false'
- name: Build HTML docs
id: linkcheck
run: |
make -C docs html linkcheck 2>&1 | tee check.log
echo "::set-output name=broken::$(grep '(line\s*[0-9]*)\(\s\)broken\(\s\)' check.log)"
env:
SPHINXOPTS: -nW --keep-going
- name: Show docs build check results
run: |
if [ -z "${{ steps.linkcheck.outputs.broken }}" ]; then
echo "No broken links found."
exit 0
else
echo "Broken links found:"
echo "${{ steps.linkcheck.outputs.broken }}"
exit 1
fi