Skip to content

Commit e489cdc

Browse files
committed
move docs deploy workflow to local as we need the swig generated stuff
1 parent 5de3e30 commit e489cdc

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

.github/workflows/python.docs-deploy.yml

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,49 @@ on:
44
branches:
55
- master
66

7-
jobs:
8-
gh_pages:
9-
uses: sensirion/.github/.github/workflows/shared.python.documentation.yml@generic-python-docs-pipeline
10-
with:
11-
run-environment: "ubuntu-22.04"
12-
build-python-version: "3.8"
13-
workdir: "./python-wrapper"
14-
15-
7+
jobs:
8+
build_pages:
9+
runs-on: "ubuntu-22.04"
10+
defaults:
11+
run:
12+
working-directory: ./python-wrapper
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/download-artifact@v4
16+
with:
17+
name: python-sources
18+
path: python-wrapper/sensirion_gas_index_algorithm
19+
- uses: actions/download-artifact@v4
20+
with:
21+
name: swig-sources
22+
path: python-wrapper/swig
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.8
26+
cache: "pip"
27+
- name: Install the project dependencies
28+
run: |
29+
python setup.py install
30+
python -m pip install -r docs/requirements.txt
31+
- name: Build documentation
32+
run: cd ./docs && make html
33+
- name: Upload html
34+
uses: actions/upload-pages-artifact@v1
35+
with:
36+
path: python-wraper/docs/_build/html
37+
deploy_pages:
38+
runs-on: "ubuntu-22.04"
39+
needs: build_pages
40+
permissions:
41+
pages: write # to deploy to Pages
42+
id-token: write # to verify the deployment originates from an appropriate source
43+
# Deploy to the github-pages environment
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v2
51+
with:
52+
token: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)