generated from childmindresearch/template-python-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 900 Bytes
/
docs.yaml
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
name: Build and publish docs
permissions:
contents: write
on:
workflow_run:
workflows: [Python Tests]
types:
- completed
branches:
- main
jobs:
build-and-publish-docs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install dependencies
run: |
python -m pip install poetry
poetry install --with docs
- name: Build docs
run: |
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
poetry run pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
touch docs_build/.nojekyll
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs_build