chore: deploy docs to github pages and manual artifacts

Refs: OPS-63
This commit is contained in:
Christoph J. Scherr 2025-03-21 13:51:45 +01:00
parent 44bbfa24d3
commit 57d2f31b19
No known key found for this signature in database
GPG key ID: 9EB784BB202BB7BB

View file

@ -5,14 +5,18 @@ on:
branches: branches:
- master - master
- devel - devel
pull_request:
branches: permissions:
- master contents: read
- devel pages: write
id-token: write
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -23,16 +27,28 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install sphinx pip install sphinx poetry
poetry install
- name: Build Sphinx documentation - name: Build Sphinx documentation
run: | run: |
cd docs cd docs && ls
sphinx-apidoc -o source/_modules ../senju bash auto_docu.sh
make html - name: Upload documentation files as artifact
- name: Upload documentation artifact id: deployment
uses: actions/upload-artifact@v4 uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with: with:
name: documentation-artifact path: docs/build/html/
path: docs/build/html
# TODO: upload artifact for gh pages deploy:
# TODO: deploy to gh pages 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