Verified Commit c9603877 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add a GH Action for docs deployment to Pages

parent 32da223a
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
name: Deploy Sphinx documentation to Pages

on:
  push:
    tags: ["v[0-9]+.[0-9]+.[0-9]+"]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v3
    - name: Install dependencies
      run: pip install .[docs]
    - name: Sphinx build
      run: make -C doc html BUILDOUT=../_site
    - name: Upload artifact
      uses: actions/upload-pages-artifact@v3
  deploy:
    runs-on: ubuntu-latest
    needs: build
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    permissions:
      pages: write
      id-token: write
    steps:
    - name: Deploy to GitHub Pages
      id: deployment
      uses: actions/deploy-pages@v4