Skip to content

Docs deploy

Docs deploy #1

Workflow file for this run

name: Docs deploy
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_run:
workflows: [Tests] # Reuse the name of your tests workflow
branches: [main, develop]
types: [completed ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
actions: read
id-token: write
concurrency:
group: deploy-${{ github.workflow }}-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
name: Deploy docs
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
timeout-minutes: 2
- uses: actions/setup-python@v5
timeout-minutes: 2
with:
python-version: '3.x'
- name: Make docs
run: |
pip install sphinx
cd docs
mkdir -p build
rm -rf build/html
make html
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./docs/build/html"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4