Skip to content

Commit 5c5b064

Browse files
committed
include docs deploy in main workflow
1 parent e489cdc commit 5c5b064

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/pyhton.generate-wrapper.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,50 @@ jobs:
108108
run: |
109109
cd docs
110110
rst-lint *.rst
111+
build_pages:
112+
runs-on: "ubuntu-22.04"
113+
defaults:
114+
run:
115+
working-directory: ./python-wrapper
116+
steps:
117+
- uses: actions/checkout@v4
118+
- uses: actions/download-artifact@v4
119+
with:
120+
name: python-sources
121+
path: python-wrapper/sensirion_gas_index_algorithm
122+
- uses: actions/download-artifact@v4
123+
with:
124+
name: swig-sources
125+
path: python-wrapper/swig
126+
- uses: actions/setup-python@v5
127+
with:
128+
python-version: 3.8
129+
cache: "pip"
130+
- name: Install the project dependencies
131+
run: |
132+
python setup.py install
133+
python -m pip install -r docs/requirements.txt
134+
- name: Build documentation
135+
run: cd ./docs && make html
136+
- name: Upload html
137+
uses: actions/upload-pages-artifact@v1
138+
with:
139+
path: python-wraper/docs/_build/html
140+
deploy_pages:
141+
runs-on: "ubuntu-22.04"
142+
needs: build_pages
143+
permissions:
144+
pages: write # to deploy to Pages
145+
id-token: write # to verify the deployment originates from an appropriate source
146+
# Deploy to the github-pages environment
147+
environment:
148+
name: github-pages
149+
url: ${{ steps.deployment.outputs.page_url }}
150+
steps:
151+
- name: Deploy to GitHub Pages
152+
id: deployment
153+
uses: actions/deploy-pages@v2
154+
with:
155+
token: ${{secrets.GITHUB_TOKEN}}
111156

112157

0 commit comments

Comments
 (0)