edit for clarity and draft final section #50
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: Publish to GitHub Pages | |
on: | |
# Run when pushing main branch | |
push: | |
branches: [ "main" ] | |
# Run when pushing button in Actions tab | |
workflow_dispatch: | |
# Empower GITHUB_TOKEN to do the work | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow just one concurrent deployment, but make sure it can run to completion | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build the documentation and upload it as an artifact | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
- name: Install Sphinx & Autoprogram, Copy Button, Design, RTD Theme | |
run: | | |
python -m pip install --upgrade pip | |
pip install sphinx sphinxcontrib-autoprogram | |
pip install sphinx-copybutton sphinx_design sphinx-rtd-theme | |
- name: Set up Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Build documentation | |
run: | | |
echo 'βββ Current Working Directory ββββββββββββββββββββββββββββββββββββββββββ' | |
pwd | |
ls -ld docs | |
echo 'ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ' | |
cd docs | |
make html | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: github-pages | |
path: docs/_build/html/ | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy Artifact to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |