Add versioned GDS layout registry and v0/v1/v2 embedding standards #423
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 and Deploy Sphinx Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| paths: | |
| - 'squadds/**' | |
| - 'docs/**' | |
| - 'tutorials/**' | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| paths: | |
| - 'squadds/**' | |
| - 'docs/**' | |
| - 'tutorials/**' | |
| workflow_dispatch: | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| QISKIT_METAL_HEADLESS: "1" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.11 | |
| - name: Install system dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libegl1 libopengl0 libglu1-mesa | |
| - name: Install dependencies | |
| run: uv sync --extra docs --extra dev | |
| - name: Verify installation | |
| run: | | |
| uv run python -c "import scqubits; print(scqubits.__version__)" | |
| uv run python -c "import squadds; print(squadds.__version__)" | |
| - name: Test Python Imports | |
| run: uv run pytest -q tests/imports_test.py --tb=short | |
| - name: Install Pandoc v 2.18 | |
| run: | | |
| sudo apt-get remove -y pandoc | |
| wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb | |
| sudo dpkg -i pandoc-2.18-1-amd64.deb | |
| - name: Generate documentation | |
| run: | | |
| cd docs | |
| uv run sphinx-apidoc -f -o source/ ../ | |
| - name: Move tutorials to docs/source/tutorials | |
| run: | | |
| cp tutorials/Tutorial*.ipynb docs/source/tutorials || true | |
| cp tutorials/*.png docs/source/tutorials || true | |
| - name: Build documentation | |
| run: | | |
| cd docs | |
| rm -rf build/ | |
| uv run sphinx-build -b html . build/html | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.SQuADDS }} | |
| publish_dir: ./docs/build/html |