Skip to content

move docs deploy workflow to local as we need the swig generated stuff #7

move docs deploy workflow to local as we need the swig generated stuff

move docs deploy workflow to local as we need the swig generated stuff #7

on:
push:
pull_request:
branches:
- master
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}}