From e489cdc1e8a2a0c9b77bbd08e04601e431bab1de Mon Sep 17 00:00:00 2001 From: lfierz Date: Fri, 3 Jan 2025 13:56:26 +0100 Subject: [PATCH] move docs deploy workflow to local as we need the swig generated stuff --- .github/workflows/python.docs-deploy.yml | 55 ++++++++++++++++++++---- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python.docs-deploy.yml b/.github/workflows/python.docs-deploy.yml index 3159bed..04c4def 100644 --- a/.github/workflows/python.docs-deploy.yml +++ b/.github/workflows/python.docs-deploy.yml @@ -4,12 +4,49 @@ on: branches: - master -jobs: - gh_pages: - uses: sensirion/.github/.github/workflows/shared.python.documentation.yml@generic-python-docs-pipeline - with: - run-environment: "ubuntu-22.04" - build-python-version: "3.8" - workdir: "./python-wrapper" - - +jobs: + build_pages: + runs-on: "ubuntu-22.04" + defaults: + run: + working-directory: ./python-wrapper + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: python-sources + path: python-wrapper/sensirion_gas_index_algorithm + - uses: actions/download-artifact@v4 + with: + name: swig-sources + path: python-wrapper/swig + - uses: actions/setup-python@v5 + with: + python-version: 3.8 + cache: "pip" + - name: Install the project dependencies + run: | + python setup.py install + python -m pip install -r docs/requirements.txt + - name: Build documentation + run: cd ./docs && make html + - name: Upload html + uses: actions/upload-pages-artifact@v1 + with: + path: python-wraper/docs/_build/html + deploy_pages: + runs-on: "ubuntu-22.04" + needs: build_pages + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + with: + token: ${{secrets.GITHUB_TOKEN}}