refactor: move docs context to its own folder #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Sphinx Docs to GitHub Pages | |
on: | |
push: | |
branches: | |
- develop | |
paths: | |
- 'docs/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
# https://github.com/actions/setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
make --directory docs install | |
- name: Build the docs | |
run: | | |
make --directory docs dirhtml | |
- name: Upload GitHub Pages artifact | |
# https://github.com/actions/upload-pages-artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: github-pages | |
path: docs/build/dirhtml/ | |
retention-days: 1 | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
# https://github.com/actions/deploy-pages | |
uses: actions/deploy-pages@v4 |