build docs (#9) #5
Workflow file for this run
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 Docs | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python envs | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
cd docs | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements-doc.txt | |
- name: Build website | |
run: | | |
cd docs | |
sphinx-build -b html ./ ./_build/html | |
touch ./_build/html/.nojekyll | |
# Upload the book's HTML as an artifact | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "docs/_build/html" | |
# Deploy the book's HTML to GitHub Pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |