Skip to content

Commit 5054dd0

Browse files
committed
Updated workflow
1 parent 82bb6d1 commit 5054dd0

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/docs.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
name: Metko documentation
22

3-
# build the documentation whenever there are new commits on main
3+
# Build the documentation whenever there are new commits on main
44
on:
55
push:
66
branches:
77
- main
8-
# Alternative: only build for tags.
9-
# tags:
10-
# - '*'
118

12-
# security: restrict permissions for CI jobs.
9+
# Set permissions for CI jobs
1310
permissions:
1411
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress
16+
# and latest queued. However, do NOT cancel in-progress runs as we want to allow these
17+
# production deployments to complete.
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
1521

1622
jobs:
1723
# Build the documentation and upload the static HTML files as an artifact.
@@ -25,20 +31,17 @@ jobs:
2531
with:
2632
python-version: '3.13'
2733

28-
# ADJUST THIS: install all dependencies (including pdoc)
34+
# Install all dependencies
2935
- run: pip install -e .
3036
- run: pip install pdoc
31-
# ADJUST THIS: build your documentation into docs/.
32-
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
33-
# - run: python docs/make.py
34-
- run: pdoc --docformat google -o docs/
37+
# Build the documentation into docs/
38+
- run: pdoc --docformat google -o docs/ metko
3539

3640
- uses: actions/upload-pages-artifact@v4
3741
with:
3842
path: docs/
3943

40-
# Deploy the artifact to GitHub pages.
41-
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
44+
# Deploy the artifact to GitHub pages
4245
deploy:
4346
needs: build
4447
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)