forked from fdobad/template-python-package
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (63 loc) · 1.63 KB
/
auto-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# workflow for building and publishing documentation
name: build and publish doc
on:
push:
branches:
- publish
- docs
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-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
pip install --upgrade -r requirements.build.txt
pip install -e .
shell: bash
- name: Build package
run: |
source .venv/bin/activate
rm -rf doc/*
pdoc --output-directory doc --math --show-source --logo https://www.fire2a.com/static/img/logo_1_.png --favicon https://www.fire2a.com/static/img/logo_1_.png fire2a
ls doc
shell: bash
- uses: actions/upload-pages-artifact@v3
with:
path: 'doc'
deploy-job:
needs: build-job
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4