Skip to content

Commit 1176bb0

Browse files
committed
update workflow
1 parent 466c19a commit 1176bb0

1 file changed

Lines changed: 28 additions & 9 deletions

File tree

.github/workflows/jupyterlite.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
1-
name: Build JupyterLite
1+
name: Build and Publish JupyterLite to GitHub Pages
2+
23
on:
34
push:
45
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
513
jobs:
614
build:
715
runs-on: ubuntu-latest
816
steps:
917
- uses: actions/checkout@v4
10-
- uses: jupyterlite/action@v1
18+
19+
- uses: actions/setup-python@v5
1120
with:
12-
contents: .
13-
- uses: actions/upload-pages-artifact@v3
21+
python-version: '3.11'
22+
23+
- name: Install JupyterLite
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install "jupyterlite[all]"
27+
28+
# Adjust --contents if your notebooks live elsewhere
29+
- name: Build site
30+
run: jupyter lite build --contents ./content --output-dir ./_output
31+
32+
- name: Upload Pages artifact
33+
uses: actions/upload-pages-artifact@v3
1434
with:
1535
path: ./_output
36+
1637
deploy:
1738
needs: build
18-
permissions:
19-
pages: write
20-
id-token: write
39+
runs-on: ubuntu-latest
2140
environment:
2241
name: github-pages
2342
url: ${{ steps.deployment.outputs.page_url }}
24-
runs-on: ubuntu-latest
2543
steps:
26-
- id: deployment
44+
- name: Deploy to GitHub Pages
45+
id: deployment
2746
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)