Ansys integration example #260
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: Build documentation | |
| on: | |
| # run on PRs for validation | |
| pull_request: | |
| # this is used by deploy_pages.yml to do docs build on main | |
| workflow_call: | |
| inputs: | |
| artifact_name: | |
| description: "Name of the artifact to upload" | |
| required: false | |
| type: string | |
| jobs: | |
| test-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v5 | |
| - name: Install system requirements | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Restore UV environment | |
| run: cp production.uv.lock uv.lock | |
| - name: Install doc requirements | |
| run: | | |
| uv sync --extra docs --frozen | |
| - name: Build docs | |
| working-directory: docs | |
| run: | | |
| export SPHINXOPTS="-W" # treat warnings as errors | |
| uv run --no-sync make html | |
| - name: Upload HTML files | |
| uses: actions/upload-artifact@v5 | |
| if: ${{ inputs.artifact_name }} | |
| with: | |
| name: ${{ inputs.artifact_name }} | |
| path: docs/build/html | |
| if-no-files-found: error |