From 44bbfa24d3eb14fb35c416da6946f67fb92a7628 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 14 Mar 2025 16:55:37 +0100 Subject: [PATCH 1/2] chore: setup a simple generation for the documentation Refs: OPS-63 --- .github/workflows/gendocs.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/gendocs.yml diff --git a/.github/workflows/gendocs.yml b/.github/workflows/gendocs.yml new file mode 100644 index 0000000..d094fa1 --- /dev/null +++ b/.github/workflows/gendocs.yml @@ -0,0 +1,38 @@ +name: Build and Store Documentation Artifact + +on: + push: + branches: + - master + - devel + pull_request: + branches: + - master + - devel + +jobs: + build: + runs-on: ubuntu-latest + 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 + - name: Build Sphinx documentation + run: | + cd docs + sphinx-apidoc -o source/_modules ../senju + make html + - name: Upload documentation artifact + uses: actions/upload-artifact@v4 + with: + name: documentation-artifact + path: docs/build/html + # TODO: upload artifact for gh pages + # TODO: deploy to gh pages From 57d2f31b19fd56fe221c125f5b7c7e8aeddd5b49 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 21 Mar 2025 13:51:45 +0100 Subject: [PATCH 2/2] chore: deploy docs to github pages and manual artifacts Refs: OPS-63 --- .github/workflows/gendocs.yml | 44 ++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/workflows/gendocs.yml b/.github/workflows/gendocs.yml index d094fa1..a26ace9 100644 --- a/.github/workflows/gendocs.yml +++ b/.github/workflows/gendocs.yml @@ -5,14 +5,18 @@ on: branches: - master - devel - pull_request: - 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 @@ -23,16 +27,28 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install sphinx + pip install sphinx poetry + poetry install - name: Build Sphinx documentation run: | - cd docs - sphinx-apidoc -o source/_modules ../senju - make html - - name: Upload documentation artifact - uses: actions/upload-artifact@v4 + 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: - name: documentation-artifact - path: docs/build/html - # TODO: upload artifact for gh pages - # TODO: deploy to gh pages + 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