Skip to content

Commit d1fdbc6

Browse files
committed
Merge branch 'master' of github.com:Loop3D/LoopStructural
2 parents 62359d4 + 66a9958 commit d1fdbc6

File tree

2 files changed

+84
-13
lines changed

2 files changed

+84
-13
lines changed
Lines changed: 83 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,95 @@
11
name: "📚 Build documentation and deploy "
2-
32
on:
4-
workflow_dispatch:
3+
workflow_dispatch: # Able to not use cache by user demand
4+
inputs:
5+
cache:
6+
description: "Use build cache"
7+
required: false
8+
default: "true"
9+
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
env:
16+
USE_CACHE: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.cache == 'true') }}
17+
PYDEVD_DISABLE_FILE_VALIDATION: "1"
18+
PYTEST_ADDOPTS: "--color=yes"
19+
FORCE_COLOR: "True"
520

621
jobs:
7-
documentation:
8-
runs-on: ubuntu-latest
22+
doc:
23+
name: Build Documentation
24+
runs-on: ubuntu-20.04
25+
env:
26+
PYVISTA_OFF_SCREEN: "True"
27+
ALLOW_PLOTTING: true
28+
SHELLOPTS: "errexit:pipefail"
929
steps:
1030
- uses: actions/checkout@v4
11-
- run: |
12-
cp CHANGELOG.md docs/source/getting_started/CHANGELOG.md
13-
docker build . -t=lsdocs -f docs/Dockerfile
14-
docker run -v $(pwd):/LoopStructural lsdocs bash LoopStructural/docs/build_docs.sh
15-
- name: upload artifacts
16-
uses: actions/upload-artifact@v3
31+
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.12"
35+
cache: "pip"
36+
37+
- uses: awalsh128/cache-apt-pkgs-action@v1.1.3
38+
with:
39+
packages: libosmesa6-dev libgl1-mesa-dev python3-tk pandoc git-restore-mtime
40+
version: 3.0
41+
42+
- name: Install PyVista and dependencies
43+
run: |
44+
pip install -e .[docs]
45+
46+
- name: Install custom OSMesa VTK variant
47+
run: |
48+
pip uninstall vtk -y
49+
pip install vtk-osmesa==9.3.0 --index-url https://gitlab.kitware.com/api/v4/projects/13/packages/pypi/simple
50+
51+
52+
53+
- name: Build Documentation
54+
run: make -C docs html
55+
56+
- name: Dump Sphinx Warnings and Errors
57+
if: always()
58+
run: if [ -e doc/sphinx_warnings.txt ]; then cat doc/sphinx_warnings.txt; fi
59+
60+
- name: Dump VTK Warnings and Errors
61+
if: always()
62+
run: if [ -e doc/errors.txt ]; then cat doc/errors.txt; fi
63+
64+
65+
66+
67+
68+
- name: Upload HTML documentation
69+
if: always()
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: docs-build
73+
path: docs/build/html/
74+
75+
- uses: actions/upload-artifact@v4
76+
with:
77+
name: examples
78+
path: docs/source/_auto_examples/
79+
80+
- name: Get Notebooks
81+
run: |
82+
mkdir _notebooks
83+
find docs/source/_auto_examples -type f -name '*.ipynb' | cpio -p -d -v _notebooks/
84+
85+
- uses: actions/upload-artifact@v4
1786
with:
18-
path: docs/build/html
87+
name: loopstructural-notebooks
88+
path: _notebooks
89+
1990
- name: Deploy 🚀
2091
uses: JamesIves/github-pages-deploy-action@4.1.3
2192
with:
2293
branch: gh-pages # The branch the action should deploy to.
2394
folder: docs/build/html # The folder the action should deploy.
24-
25-
95+

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jupyter = [
5858
]
5959
inequalities = [
6060
"loopsolver"]
61+
docs = ["pyvista[all]", "pydata-sphinx-theme","meshio","loopstructuralvisualisation[all]","networkx","scikit-learn","scikit-image","sphinx","sphinx-gallery","geoh5py","geopandas","sphinxcontrib-bibtex","myst-parser"]
6162
[project.urls]
6263
Documentation = 'https://Loop3d.org/LoopStructural/'
6364
"Bug Tracker" = 'https://github.com/loop3d/loopstructural/issues'

0 commit comments

Comments
 (0)