Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Check polyhedron_faces when determining equivalency #24383

Check polyhedron_faces when determining equivalency

Check polyhedron_faces when determining equivalency #24383

Workflow file for this run

name: Build Documentation
on: # zizmor: ignore[cache-poisoning]
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *" # once a month on main
push:
tags:
- "*"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: none
jobs:
doc:
name: Build Documentation
runs-on: ubuntu-24.04-self-hosted-gpu
env:
PARALLEL: "-j2" # Public GitHub runners have 2 real cores
TOX_COLORED: "yes"
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Set environment for self-hosted
if: runner.environment == 'self-hosted'
run: |
echo "PARALLEL=-j8" >> $GITHUB_ENV
- uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17
if: runner.environment != 'self-hosted'
with:
packages: libosmesa6-dev libgl1-mesa-dev python3-tk pandoc git-restore-mtime
version: 3.0
- name: Install tox-uv
run: pip install tox-uv
- name: Build Documentation
run: tox run -e docs-build
- 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: Test Documentation
if: ${{ !cancelled() }}
run: tox r -e docs-test
- name: Upload Images for Failed Tests
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: doc-debug-images-failed
path: _doc_debug_images_failed
- name: Upload Test Debug Images
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: doc-debug-images
path: _doc_debug_images
- uses: actions/checkout@v5
if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')
with:
repository: pyvista/pyvista-doc-translations
path: pyvista-doc-translations
fetch-depth: 0
persist-credentials: false
- name: Build I18N Documentation
if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')
run: |
tox run -e docs-build -- mini18n-html
find doc/_build/mini18n-html -mindepth 1 -maxdepth 1 -type d -exec cp -rf {} doc/_build/html/ \;
rm -rf doc/_build/mini18n-html
- name: Upload HTML documentation
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: docs-build
path:
| # Only vtksz files in 'doc/_build/html/_images/' are used. Exclude all others since these files may be large.
doc/_build/html/
!doc/_build/html/index-*.vtksz
!doc/_build/html/api/**/*.vtksz
!doc/_build/html/extras/**/*.vtksz
!doc/_build/html/getting-started/**/*.vtksz
!doc/_build/html/user-guide/**/*.vtksz
- name: Upload non-interactive HTML documentation
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: docs-build-light
path: |
doc/_build/html/
!doc/_build/html/**/*.vtksz
- uses: actions/upload-artifact@v4
with:
name: examples
path: doc/source/examples/
- name: Get Notebooks
run: |
mkdir _notebooks
find doc/source/examples -type f -name '*.ipynb' | cpio -p -d -v _notebooks/
- uses: actions/upload-artifact@v4
with:
name: pyvista-notebooks
path: _notebooks
preview:
name: Preview Development Documentation
runs-on: ubuntu-22.04
needs: doc
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
steps:
- uses: actions/download-artifact@v5
with:
name: docs-build
path: .
- name: Preview HTML documentation
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654
with:
publish-dir: .
production-deploy: ${{ github.ref == 'refs/heads/main' }}
github-token: ${{ secrets.PYVISTA_BOT_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: false
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEV_SITE_ID }} # DEV site
timeout-minutes: 10
deploy:
name: Publish Release Documentation
runs-on: ubuntu-22.04
needs: doc
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v5
with:
name: docs-build
path: .
- name: Deploy Release Documentation
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654
with:
publish-dir: .
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: false
overwrites-pull-request-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_STABLE_SITE_ID }} # STABLE site
timeout-minutes: 10
publish-notebooks:
name: Publish Notebooks for MyBinder
runs-on: ubuntu-22.04
needs: doc
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Dependencies
run: |
pip install cookiecutter
- uses: actions/download-artifact@v5
with:
name: pyvista-notebooks
path: .
- name: Make Cookiecutter
run: |
cookiecutter -f --no-input --config-file ./doc/source/pyvista-binder-config.yml https://github.com/pyvista/cookiecutter-pyvista-binder.git;
rm -rf ./pyvista-examples/notebooks/
cp -r doc/source/examples/ ./pyvista-examples/
ls -l ./pyvista-examples/
- name: Publish notebooks on release
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
external_repository: pyvista/pyvista-examples
personal_token: ${{ secrets.PYVISTA_BOT_TOKEN }}
publish_dir: pyvista-examples
publish_branch: master
exclude_assets: ""