Bump actions/deploy-pages from 2 to 4 #61
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: Qujax Docs | |
on: | |
pull_request: | |
branches: | |
- main | |
- develop | |
push: | |
branches: | |
- main | |
jobs: | |
build_docs: | |
name: Build and publish docs | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Upgrade pip and install wheel | |
run: pip install --upgrade pip wheel | |
- name: Install qujax | |
run: | | |
pip install . | |
- name: Install docs dependencies | |
run: | | |
pip install -r .github/workflows/docs/requirements.txt | |
- name: Build docs | |
timeout-minutes: 20 | |
run: | | |
cd .github/workflows/docs | |
mkdir qujax | |
cd qujax | |
sphinx-build ../../../../docs . -a | |
- name: Upload docs as artefact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: .github/workflows/docs/qujax | |
publish_docs: | |
name: Publish docs | |
if: github.event_name == 'push' && contains(github.ref_name, 'main') | |
needs: build_docs | |
runs-on: ubuntu-22.04 | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |