Skip to content

Commit 4474963

Browse files
committed
add doc workflow
1 parent fe085df commit 4474963

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

.github/workflows/doc.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy documentation to GitHub Pages
2+
3+
# build the documentation whenever there are new commits on main
4+
on:
5+
push:
6+
branches:
7+
- main
8+
# Alternative: only build for tags.
9+
# tags:
10+
# - '*'
11+
12+
# security: restrict permissions for CI jobs.
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
# Build the documentation and upload the static HTML files as an artifact.
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
26+
# ADJUST THIS: install all dependencies (including pdoc)
27+
- run: pip install -e .
28+
# ADJUST THIS: build your documentation into docs/.
29+
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
30+
- run: python docs/make.py
31+
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: docs/
35+
36+
# Deploy the artifact to GitHub pages.
37+
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
38+
deploy:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
permissions:
42+
pages: write
43+
id-token: write
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- id: deployment
49+
uses: actions/deploy-pages@v4

.github/workflows/python-package.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python package
1+
name: Create Python package
22

33
on:
44
workflow_dispatch:
@@ -68,4 +68,4 @@ jobs:
6868
run: |
6969
gh release create --generate-notes ${{ env.NEW_VERSION }}
7070
env:
71-
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
71+
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)