Skip to content

Commit b025628

Browse files
authored
Enable docs workflow with build and deploy steps
Updated the GitHub Actions workflow to enable documentation build and deployment.
1 parent 8623936 commit b025628

1 file changed

Lines changed: 41 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Docs
22

33
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'docs/**'
8+
- 'pnpl/**'
9+
- 'setup.py'
10+
- 'requirements.txt'
11+
- '.github/workflows/docs.yml'
12+
- 'README.md'
413
workflow_dispatch:
514

615
permissions:
@@ -16,9 +25,39 @@ jobs:
1625
build:
1726
runs-on: ubuntu-latest
1827
steps:
19-
- run: echo "Docs workflow temporarily disabled"
28+
- name: Check out repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Python 3.11
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.11'
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install -e .
40+
pip install -r docs/requirements.txt
41+
42+
- name: Build Jupyter Book
43+
run: |
44+
jupyter-book build docs/
45+
46+
- name: Upload GitHub Pages artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: docs/_build/html
2050

2151
deploy:
52+
needs: build
2253
runs-on: ubuntu-latest
54+
permissions:
55+
pages: write
56+
id-token: write
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
2360
steps:
24-
- run: echo "Docs deployment temporarily disabled"
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)