| 1 |
name: Sphinx |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- main |
| 6 |
|
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
jobs: |
| 12 |
sphinx: |
| 13 |
|
| 14 |
runs-on: ubuntu-latest |
| 15 |
|
| 16 |
steps: |
| 17 |
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| 18 |
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 19 |
with: |
| 20 |
python-version: "3.x" |
| 21 |
architecture: "x64" |
| 22 |
cache: "pip" |
| 23 |
- name: Build Documentation |
| 24 |
run: | |
| 25 |
pip install -e .[docs] |
| 26 |
make html |
| 27 |
- name: Upload artifact |
| 28 |
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 |
| 29 |
with: |
| 30 |
# Upload entire repository |
| 31 |
path: 'build/html' |
| 32 |
|
| 33 |
pages: |
| 34 |
|
| 35 |
runs-on: ubuntu-latest |
| 36 |
if: github.ref == 'refs/heads/main' |
| 37 |
needs: [sphinx] |
| 38 |
|
| 39 |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
| 40 |
permissions: |
| 41 |
contents: read |
| 42 |
pages: write |
| 43 |
id-token: write |
| 44 |
|
| 45 |
environment: |
| 46 |
name: github-pages |
| 47 |
url: ${{ steps.deployment.outputs.page_url }} |
| 48 |
|
| 49 |
steps: |
| 50 |
- name: Deploy to GitHub Pages |
| 51 |
id: deployment |
| 52 |
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |