-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Loop3D/LoopStructural
- Loading branch information
Showing
2 changed files
with
84 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,95 @@ | ||
name: "📚 Build documentation and deploy " | ||
|
||
on: | ||
workflow_dispatch: | ||
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: | ||
documentation: | ||
runs-on: ubuntu-latest | ||
doc: | ||
name: Build Documentation | ||
runs-on: ubuntu-20.04 | ||
env: | ||
PYVISTA_OFF_SCREEN: "True" | ||
ALLOW_PLOTTING: true | ||
SHELLOPTS: "errexit:pipefail" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
cp CHANGELOG.md docs/source/getting_started/CHANGELOG.md | ||
docker build . -t=lsdocs -f docs/Dockerfile | ||
docker run -v $(pwd):/LoopStructural lsdocs bash LoopStructural/docs/build_docs.sh | ||
- name: upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
|
||
- uses: awalsh128/[email protected] | ||
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: | ||
path: docs/build/html | ||
name: loopstructural-notebooks | ||
path: _notebooks | ||
|
||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: docs/build/html # The folder the action should deploy. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters