Repository navigation
Merge pull request #2085 from Motphys/feat/issue-2079-cuda-mps-cli #649
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/sphinx/**" | |
| - "docs/README.md" | |
| - "src/unilab/**" | |
| - "scripts/generate_support_matrix.py" | |
| - "src/unilab/conf/**" | |
| - "README.md" | |
| - "CONTRIBUTING.md" | |
| - "AGENTS.md" | |
| - "CLAUDE.md" | |
| - ".github/workflows/docs.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "docs/sphinx/**" | |
| - "docs/README.md" | |
| - "src/unilab/**" | |
| - "scripts/generate_support_matrix.py" | |
| - "src/unilab/conf/**" | |
| - "README.md" | |
| - "CONTRIBUTING.md" | |
| - "AGENTS.md" | |
| - "CLAUDE.md" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| name: Build Sphinx | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| UNILAB_DOCS_SKIP_AUTODOC: "1" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Build prose-only HTML | |
| working-directory: docs/sphinx | |
| run: > | |
| uv run --no-project | |
| --with-requirements requirements.txt | |
| sphinx-build -b html -n source build/html | |
| - name: Upload built site | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-html | |
| path: docs/sphinx/build/html | |
| retention-days: 7 | |
| deploy: | |
| name: Deploy to UniLab-doc gh-pages | |
| needs: build | |
| if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libgl1 libegl1 libosmesa6 libglfw3 \ | |
| ffmpeg | |
| - name: Install UniLab (autodoc target) | |
| id: install_unilab | |
| continue-on-error: true | |
| # Full build so api_reference autodoc renders. If the install fails | |
| # we fall back to a prose-only build and still deploy. | |
| run: | | |
| uv sync | |
| uv pip install -r docs/sphinx/requirements.txt | |
| - name: Configure prose-only fallback | |
| if: steps.install_unilab.outcome != 'success' | |
| run: | | |
| echo "::warning::UniLab install failed — deploying prose-only docs" | |
| echo "UNILAB_DOCS_SKIP_AUTODOC=1" >> "$GITHUB_ENV" | |
| - name: Build full HTML | |
| working-directory: docs/sphinx | |
| run: uv run --no-sync sphinx-build -j auto -b html -n source build/html | |
| - name: Push to UniLab-doc gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| # SSH deploy key for unilabsim/UniLab-doc (write access required). | |
| # Stored in this repo's Secrets as UNILAB_DOC_DEPLOY_KEY. | |
| deploy_key: ${{ secrets.UNILAB_DOC_DEPLOY_KEY }} | |
| external_repository: unilabsim/UniLab-doc | |
| publish_branch: gh-pages | |
| publish_dir: docs/sphinx/build/html | |
| user_name: "github-actions[bot]" | |
| user_email: "github-actions[bot]@users.noreply.github.com" | |
| commit_message: "docs: deploy from UniLab@${{ github.sha }}" | |
| full_commit_message: | | |
| docs: deploy from UniLab@${{ github.sha }} | |
| Source: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} |