Skip to content

Commit 14f9f6e

Browse files
committed
add CI pipeline for docs
1 parent 8bfda96 commit 14f9f6e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/docs.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: website
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.13'
25+
26+
# Install dependencies
27+
- run: pip install -e .
28+
- run: pip install pdoc
29+
# Build the documentation
30+
- run: pdoc src/benlink -o docs --logo /logo.svg
31+
- run: cp logo.svg docs
32+
33+
- uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: docs/
36+
37+
# Deploy the artifact to GitHub pages.
38+
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
39+
deploy:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
permissions:
43+
pages: write
44+
id-token: write
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)