senju/.github/workflows/gendocs.yml
2025-03-21 14:37:19 +01:00

54 lines
1.2 KiB
YAML

name: Build and Store Documentation Artifact
on:
push:
branches:
- master
- devel
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx poetry
poetry install
- name: Build Sphinx documentation
run: |
cd docs && ls
bash auto_docu.sh
- name: Upload documentation files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with:
path: docs/build/html/
deploy:
needs: build
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4