fix: Update doc node 22 (#130) #60
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
# SPDX-FileCopyrightText: 2024 grow platform GmbH | |
# | |
# SPDX-License-Identifier: MIT | |
name: Build user documentation | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- user-documentation/** | |
pull_request: | |
paths: | |
- user-documentation/** | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- uses: actions/cache@v3 | |
id: cache-venv | |
name: Cache virtual environment | |
with: | |
path: user-documentation/.venv/ | |
key: user-documentation-venv-${{ hashFiles('user-documentation/requirements.lock', 'user-documentation/Makefile') }} | |
- name: Setup virtual environment | |
if: ${{ steps.cache-venv.outputs.cache-hit != 'true' }} | |
run: | | |
make -C user-documentation prepare | |
- name: Sphinx Build | |
run: | | |
make -C user-documentation openapi | |
make -C user-documentation html | |
env: | |
SPHINXOPTS: -W -D todo_include_todos=${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation | |
path: user-documentation/build/html | |
- name: Upload Github Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: user-documentation/build/html | |
deploy: | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |