name: Documentation-Action on: push: branches: - main pull_request: types: [reopened, opened, synchronize] jobs: doc-build: name: Doc-Build runs-on: ubuntu-latest steps: - name: Install prior to running the process run: | sudo apt install pandoc snapd -y sudo snap install drawio - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.11 - name: Install and configure Poetry uses: snok/install-poetry@v1 with: version: 1.6.1 virtualenvs-create: false - name: Poetry install run: poetry install --with doc --all-extras --without test,lint - name: Doc-Build run: | cd documentations sphinx-apidoc -o . ../src/aki_prj23_transparenzregister -feP make html - name: Package artifact uses: actions/upload-pages-artifact@v2 with: path: documentations/_build/html/ doc-deploy: name: Doc-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@v4 with: name: github-pages - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v3 with: artifact_name: github-pages