Skip to content

Merge pull request #1325 from VisLab/fix_links #362

Merge pull request #1325 from VisLab/fix_links

Merge pull request #1325 from VisLab/fix_links #362

Workflow file for this run

name: Deploy Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: '3.10'
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Create virtual environment
run: |
uv venv --clear .venv
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: uv pip install -e ".[docs]"
- name: Configure Git for GitHub Pages
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Build documentation
run: |
sphinx-build -b html docs docs/_build/html
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: ./docs/_build/html
#------------------------------------------------
# Deploy Job: Deploys the built site
#------------------------------------------------
deploy:
# This job depends on the 'build' job completing successfully
needs: build
# Only deploy when pushing to main branch, not on pull requests
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
# Specify the deployment environment
environment:
name: github-pages
# The URL will be automatically set by the deployment step's output
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
# This is the official action for deploying the artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5