Skip to content

Commit

Permalink
move docs deploy workflow to local as we need the swig generated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonieFierz committed Jan 3, 2025
1 parent 5de3e30 commit e489cdc
Showing 1 changed file with 46 additions and 9 deletions.
55 changes: 46 additions & 9 deletions .github/workflows/python.docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

0 comments on commit e489cdc

Please sign in to comment.