mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-24 17:12:34 +02:00
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
name: Documentation-Action
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- docs/timeline-etc
|
|
pull_request:
|
|
types: [reopened, opened, synchronize]
|
|
|
|
jobs:
|
|
doc-build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install prio to running the process
|
|
run: |
|
|
sudo apt install pandoc -y
|
|
- uses: actions/checkout@v3
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.4.2
|
|
virtualenvs-create: false
|
|
- run: poetry install --only doc,root,develop --all-extras
|
|
- name: Doc-Build
|
|
run: |
|
|
cd documentations
|
|
sphinx-apidoc -o . ../src/aki_prj23_transparenzregister -feP
|
|
make html
|
|
- name: Package artifact
|
|
uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: documentations/_build/html/
|
|
|
|
doc-deploy:
|
|
name: Deployment
|
|
runs-on: ubuntu-latest
|
|
needs: doc-build
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
if: github.ref == 'refs/heads/main'
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- run: echo "Deployment URL = ${{ steps.deployment.outputs.page_url }}"
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: github-pages
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v2
|
|
with:
|
|
artifact_name: github-pages
|