-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (57 loc) · 1.91 KB
/
docs.yml
File metadata and controls
69 lines (57 loc) · 1.91 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/setup.py', '**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-docs-
${{ runner.os }}-pip-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libproj-dev proj-data proj-bin libgeos-dev
sudo apt-get install -y pandoc
- name: Install package with docs dependencies
env:
CUDA_VISIBLE_DEVICES: "-1"
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -e ".[docs]"
- name: Build documentation
run: |
cd docs
make clean
make html
- name: Check for documentation warnings
run: |
cd docs
# Build docs and capture output
make html 2>&1 | tee build_output.txt
# Check for warnings, excluding known harmless ones
if grep -i "warning" build_output.txt | grep -v "Protobuf gencode version" | grep -v "UserWarning" | grep -v "warnings\.warn" | grep -q .; then
echo "Documentation build produced warnings (excluding protobuf warnings):"
grep -i "warning" build_output.txt | grep -v "Protobuf gencode version" | grep -v "UserWarning" | grep -v "warnings\.warn"
exit 1
fi
echo "Documentation build completed successfully (protobuf warnings ignored)"
- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/html/