Skip to content

Commit 93029a4

Browse files
committed
Add ci stage to test for broken links in documentation
1 parent da92888 commit 93029a4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,19 @@ jobs:
5656
- name: Upload coverage
5757
run: |
5858
codecov -e TOXENV,DJANGO
59+
60+
test-docs:
61+
name: Test documentation links
62+
runs-on: ubuntu-20.04
63+
steps:
64+
- uses: actions/checkout@v3
65+
66+
- uses: actions/setup-python@v4
67+
with:
68+
python-version: '3.11'
69+
70+
- run: pip install -r requirements/requirements-documentation.txt
71+
- run: mkdocs serve &
72+
- run: WAIT_TIME=0 && until nc -vzw 2 localhost 8000 || [ $WAIT_TIME -eq 5 ]; do sleep $(( WAIT_TIME++ )); done
73+
- run: if [ $WAIT_TIME == 5 ]; then echo cannot start mkdocs server on http://localhost:8000; exit 1; fi
74+
- run: pylinkvalidate.py -P http://localhost:8000/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# MkDocs to build our documentation.
22
mkdocs>=1.1.2,<1.2
33
jinja2>=2.10,<3.1.0 # contextfilter has been renamed
4+
5+
# pylinkvalidator to check for broken links in documentation.
6+
pylinkvalidator==0.3

0 commit comments

Comments
 (0)