Use Python "-I" option to isolate user environment #56
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: Build and deploy docs | |
on: | |
push: | |
branches: # ignore pushed tags | |
- "*" | |
paths: | |
- 'docs/**' | |
pull_request: | |
paths: | |
- 'docs/**' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docs | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- run: python -m pip install -r requirements.txt | |
- run: make html | |
- uses: actions/upload-pages-artifact@v3 | |
if: github.ref_name == 'master' | |
with: | |
path: docs/_build/html | |
deploy: | |
if: github.ref_name == 'master' | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v4 |