-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (38 loc) · 1.28 KB
/
workflow-pages.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
---
name: Build dgpost docs
on:
workflow_call:
inputs:
os:
required: true
type: string
pyver:
required: true
type: string
jobs:
pages:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.pyver }}
- uses: actions/download-artifact@v4
with:
name: dist-${{ inputs.os }}-${{ inputs.pyver }}
- uses: jannekem/run-python-script-action@v1
with:
script: |
import os
import subprocess
fn = [f for f in os.listdir() if f.endswith('whl') and f.startswith('dgpost')][0]
subprocess.run(["pip", "install", f"{fn}[docs]"])
- name: Build the docs
shell: bash
run: |
sphinx-apidoc -o docs/source/apidoc src/dgpost -T -M -E -f -e --templatedir=docs/apidoc_t
sphinx-build -b html docs/source public/main
- uses: actions/upload-artifact@v4
with:
name: public-${{ inputs.os }}-${{ inputs.pyver }}
path: public/main