-
Notifications
You must be signed in to change notification settings - Fork 1.5k
45 lines (42 loc) · 1.32 KB
/
build_docs.yml
File metadata and controls
45 lines (42 loc) · 1.32 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
name: build_docs
on:
push:
branches:
- dev
- main
- releasing/*
pull_request:
branches:
- dev
- main
- releasing/*
concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: build-docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-docs:
runs-on: ubuntu-latest
env:
# minimum supported version of Python
PYTHON_VER1: '3.10'
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ env.PYTHON_VER1 }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VER1 }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r docs/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
- name: Make html
run: |
cd docs/
make clean
make html 2>&1 | tee tmp_log
if [[ $(grep -c "ERROR:" tmp_log) != 0 ]]; then echo "Found errors"; grep "ERROR:" tmp_log; exit 1; fi
sed '/WARNING.*pip/d' tmp_log > tmp_log1; mv tmp_log1 tmp_log # monai#7133
if [[ $(grep -c "WARNING:" tmp_log) != 0 ]]; then echo "Found warnings"; grep "WARNING:" tmp_log; exit 1; fi
shell: bash