forked from fdobad/template-python-package
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fdobad
committed
Jul 3, 2024
1 parent
f129fe7
commit a48d93e
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# workflow for building and publishing documentation | ||
name: build and publish doc | ||
|
||
on: | ||
push: | ||
branches: | ||
- publish | ||
- docs | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
qgis-job: | ||
runs-on: ubuntu-latest | ||
container: qgis/qgis:latest | ||
|
||
steps: | ||
- name: Inspect container | ||
run: | | ||
qgis --version | ||
python3 -V | ||
echo $SHELL | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
src | ||
tests | ||
- name: Install dependencies | ||
run: | | ||
python3 -m venv --system-site-packages .venv | ||
source .venv/bin/activate | ||
python -m pip install --upgrade pip wheel setuptools setuptools_scm | ||
pip install -r requirements.doc.txt | ||
shell: bash | ||
|
||
- name: Build package | ||
run: | | ||
ls | ||
source .venv/bin/activate | ||
mkdir -p doc | ||
pdoc --html --force --output-dir doc --filter=src,tests --config latex_math=True . | ||
ls doc | ||
shell: bash | ||
|
||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'doc/fire2a-lib' | ||
|
||
deploy-job: | ||
needs: qgis-job | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |