-
Notifications
You must be signed in to change notification settings - Fork 50
95 lines (72 loc) · 2.48 KB
/
documentation.yml
File metadata and controls
95 lines (72 loc) · 2.48 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: "📚 Build documentation and deploy "
on:
workflow_dispatch: # Able to not use cache by user demand
inputs:
cache:
description: "Use build cache"
required: false
default: "true"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
USE_CACHE: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.cache == 'true') }}
PYDEVD_DISABLE_FILE_VALIDATION: "1"
PYTEST_ADDOPTS: "--color=yes"
FORCE_COLOR: "True"
jobs:
doc:
name: Build Documentation
runs-on: ubuntu-latest
env:
PYVISTA_OFF_SCREEN: "True"
ALLOW_PLOTTING: true
SHELLOPTS: "errexit:pipefail"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- uses: awalsh128/cache-apt-pkgs-action@v1.1.3
with:
packages: libosmesa6-dev libgl1-mesa-dev python3-tk pandoc git-restore-mtime
version: 3.0
- name: Install PyVista and dependencies
run: |
pip install -e .[docs]
- name: Install custom OSMesa VTK variant
run: |
pip uninstall vtk -y
pip install vtk-osmesa==9.3.0 --index-url https://gitlab.kitware.com/api/v4/projects/13/packages/pypi/simple
- name: Build Documentation
run: make -C docs html
- name: Dump Sphinx Warnings and Errors
if: always()
run: if [ -e doc/sphinx_warnings.txt ]; then cat doc/sphinx_warnings.txt; fi
- name: Dump VTK Warnings and Errors
if: always()
run: if [ -e doc/errors.txt ]; then cat doc/errors.txt; fi
- name: Upload HTML documentation
if: always()
uses: actions/upload-artifact@v4
with:
name: docs-build
path: docs/build/html/
- uses: actions/upload-artifact@v4
with:
name: examples
path: docs/source/_auto_examples/
- name: Get Notebooks
run: |
mkdir _notebooks
find docs/source/_auto_examples -type f -name '*.ipynb' | cpio -p -d -v _notebooks/
- uses: actions/upload-artifact@v4
with:
name: loopstructural-notebooks
path: _notebooks
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.