Skip to content

Commit cdab53a

Browse files
committed
add workflow to detect docs-errors
1 parent 3a566fa commit cdab53a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/check_docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
3+
name: Check Docs
4+
5+
on:
6+
push:
7+
branches: [latest]
8+
paths:
9+
- 'docs/**'
10+
- '.github/workflows/check_docs.yml'
11+
pull_request:
12+
branches: [latest]
13+
paths:
14+
- 'docs/**'
15+
- '.github/workflows/check_docs.yml'
16+
17+
jobs:
18+
lint:
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 5
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
with:
26+
ref: ${{ github.ref }}
27+
28+
- name: Install python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install dependencies
34+
run: pip install -r docs/requirements.txt > /dev/null
35+
shell: bash
36+
37+
- name: Building docs => failing on errors
38+
run: |
39+
if bash docs/html.sh 2>&1 | grep -q 'ERROR:'
40+
then
41+
echo 'GOT ERROR ON BUILDING-DOCS: "bash docs/html.sh"'
42+
exit 1
43+
fi
44+
shell: bash
45+
env:
46+
PYTHONUNBUFFERED: 1

0 commit comments

Comments
 (0)