build: bump ansys-sphinx-theme from 1.7.0 to 1.7.1 in /doc in the doc… #267
This file contains hidden or 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
| name: Geometry Mesh Workflow | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| doc-build: | |
| required: false | |
| default: false | |
| type: boolean | |
| description: 'Whether to build the documentation' | |
| workflow_call: | |
| inputs: | |
| doc-build: | |
| required: false | |
| default: false | |
| type: boolean | |
| description: 'Whether to build the documentation' | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - 'geometry-mesh/**' | |
| env: | |
| MAIN_PYTHON_VERSION: '3.12' | |
| GEOMETRY_DOCKER_IMAGE: 'ghcr.io/ansys/geometry' | |
| PRIME_DOCKER_IMAGE: 'ghcr.io/ansys/prime' | |
| ANSRV_GEO_PORT: 700 | |
| ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
| PYPRIMEMESH_LAUNCH_CONTAINER: 1 | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER )}} | |
| ANSYS_RELEASE_FOR_DOCS: 25.1 | |
| jobs: | |
| is-only-docs-required: | |
| uses: ./.github/workflows/check-docs-required.yml | |
| with: | |
| doc-build: ${{ inputs.doc-build || false }} | |
| geometry: | |
| name: Geometry | |
| runs-on: [self-hosted, Windows, pyansys-workflows] | |
| needs: is-only-docs-required | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ansys-release: ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[25.1]') || fromJSON('[24.1, 24.2, 25.1]') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| sparse-checkout: | | |
| geometry-mesh | |
| doc | |
| - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Setup headless display | |
| uses: pyvista/setup-headless-display-action@v4 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m venv .venv | |
| .venv/Scripts/activate | |
| pip install -r geometry-mesh/requirements_${{ matrix.ansys-release }}.txt | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download (if needed) and run Geometry service container | |
| run: | | |
| # If we are on 25.1 or above - the tag name is different - remember we are on powershell | |
| if (${{ matrix.ansys-release }} -ge 25.2) { | |
| $env:ANSYS_GEOMETRY_RELEASE = "${{ env.GEOMETRY_DOCKER_IMAGE }}:core-windows-${{ matrix.ansys-release }}" | |
| } else { | |
| $env:ANSYS_GEOMETRY_RELEASE = "${{ env.GEOMETRY_DOCKER_IMAGE }}:windows-${{ matrix.ansys-release }}" | |
| } | |
| Write-Host "Running Geometry service container: $env:ANSYS_GEOMETRY_RELEASE" | |
| # Pull the container image | |
| docker pull $env:ANSYS_GEOMETRY_RELEASE | |
| # Define the ANSYS_GEOMETRY_RELEASE environment variable to be used in the next stages | |
| echo "ANSYS_GEOMETRY_RELEASE=$env:ANSYS_GEOMETRY_RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Run the PyAnsys Geometry script | |
| run: | | |
| .venv/Scripts/activate | |
| python geometry-mesh/wf_gm_01_geometry.py | |
| - name: Store the outputs | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: geometry-mesh-workflow-geometry-outputs-${{ matrix.ansys-release }} | |
| path: geometry-mesh/outputs | |
| - name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}}) | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| env: | |
| BUILD_DOCS_SCRIPT: 'geometry-mesh/wf_gm_01_geometry.py' | |
| run: | | |
| .venv/Scripts/activate | |
| cd doc | |
| pip install -r requirements.txt | |
| ./make.bat html | |
| - name: (DOCS) Upload docs artifacts | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: geometry-mesh-docs-stage-geometry | |
| path: | | |
| doc/_build/ | |
| doc/source/examples/geometry-mesh/ | |
| - name: Stop any remaining containers | |
| if: always() | |
| run: | | |
| $dockerContainers = docker ps -a -q | |
| if (-not [string]::IsNullOrEmpty($dockerContainers)) { | |
| docker rm -f $dockerContainers | |
| } | |
| prime: | |
| name: Meshing | |
| runs-on: ubuntu-latest | |
| needs: [geometry, is-only-docs-required] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ansys-release: ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[25.1]') || fromJSON('[24.1, 24.2, 25.1]') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| sparse-checkout: | | |
| geometry-mesh | |
| doc | |
| - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Setup headless display | |
| uses: pyvista/setup-headless-display-action@v4 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r geometry-mesh/requirements_${{ matrix.ansys-release }}.txt | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download PRIME service container | |
| run: docker pull ${{ env.PRIME_DOCKER_IMAGE }}:${{ matrix.ansys-release }} | |
| - name: Check out the geometry outputs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: geometry-mesh-workflow-geometry-outputs-${{ matrix.ansys-release }} | |
| path: geometry-mesh/outputs | |
| - name: Run the PyPrimeMesh script | |
| env: | |
| PYPRIMEMESH_IMAGE_TAG: ${{ matrix.ansys-release }} | |
| run: | | |
| python geometry-mesh/wf_gm_02_mesh.py | |
| - name: Store the outputs | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: geometry-mesh-workflow-prime-outputs-${{ matrix.ansys-release }} | |
| path: geometry-mesh/outputs | |
| - name: (DOCS) Download the docs artifacts | |
| uses: actions/download-artifact@v8 | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| with: | |
| name: geometry-mesh-docs-stage-geometry | |
| path: doc | |
| - name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}}) | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| env: | |
| PYPRIMEMESH_IMAGE_TAG: ${{ matrix.ansys-release }} | |
| BUILD_DOCS_SCRIPT: 'geometry-mesh/wf_gm_02_mesh.py' | |
| run: | | |
| cd doc | |
| find . -type f -exec sed -i 's|C:\\Users\\ansys\\actions-runner\\_work\\pyansys-workflows\\pyansys-workflows\\doc\\source\\examples\\geometry-mesh\\images\\|./images/|g' {} + | |
| pip install -r requirements.txt | |
| make html | |
| - name: (DOCS) Upload docs artifacts | |
| if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: geometry-mesh-docs | |
| path: | | |
| doc/_build/ | |
| doc/source/examples/geometry-mesh/ | |
| overwrite: true |