Skip to content

Deploy Sphinx Documentation #7

Deploy Sphinx Documentation

Deploy Sphinx Documentation #7

Workflow file for this run

name: Deploy Sphinx Documentation
on:
push:
tags:
- "v*"
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[docs]
- name: Build Documentation
run: |
cd docs
make html
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
steps:
- name: GitHub Pages
id: deployment
uses: actions/deploy-pages@v4