-
Notifications
You must be signed in to change notification settings - Fork 43
72 lines (70 loc) · 1.85 KB
/
docs.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Documentation
on:
push:
branches: "*"
tags: "v*"
pull_request:
branches: "**"
jobs:
doc:
name: Build Documentation
runs-on: ubuntu-latest
env:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
ALLOW_PLOTTING: true
SHELLOPTS: 'errexit:pipefail'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Headless Display
run: |
sudo apt-get install libgl1-mesa-glx
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
- name: Install Dependencies
run: |
pip install Cython
pip install -r requirements.txt
pip install -r docs/requirements.txt
pip install cookiecutter
- name: Install PVGeo
run: pip install -e .[pyproj,omf,discretize]
- name: Build Documentation
run: |
cd ./docs;
make html;
set -e;
make html;
cd ..;
- uses: actions/upload-artifact@v4
with:
name: docs-build
path: docs/build
- uses: actions/upload-artifact@v4
with:
name: notebooks
path: docs/source/examples
deploy:
name: Publish Documentation
runs-on: ubuntu-latest
needs: doc
# if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: docs-build
path: docs/build
- uses: actions/download-artifact@v4
with:
name: notebooks
path: docs/source/examples
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/build/html