name: Build and Deploy Docs on: push: branches: - main permissions: contents: write jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: python-version: "3.x" - name: Install dependencies run: pip install sphinx sphinx_rtd_theme sphinx-autodoc-typehints myst-parser - name: Generate Class List run: | pip install . python ./docs/source/generate_class_list.py - name: Build Docs run: | cd docs sphinx-apidoc -o ./source/ ../src/ -M --no-toc rm ./source/*.rst make html touch ./build/html/.nojekyll - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: docs/build/html deploy: needs: build runs-on: ubuntu-latest permissions: contents: read pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4