Skip to content

Commit 6c56dfa

Browse files
committed
add github pages build
1 parent 380ae3f commit 6c56dfa

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66
pull_request:
7-
branches: '*'
7+
branches: ['*']
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -54,6 +54,47 @@ jobs:
5454
path: dist/jupyterlab_hybrid_kernels*
5555
if-no-files-found: error
5656

57+
build_lite:
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
- name: Setup Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.11'
67+
- uses: actions/download-artifact@v4
68+
with:
69+
name: extension-artifacts
70+
- name: Install the dependencies
71+
run: |
72+
python -m pip install --pre jupyterlite-core jupyterlite-pyodide-kernel jupyterlab_hybrid_kernels*.whl
73+
- name: Build the JupyterLite site
74+
run: |
75+
jupyter lite build --output-dir dist
76+
- name: Upload artifact
77+
uses: actions/upload-pages-artifact@v3
78+
with:
79+
path: ./dist
80+
81+
deploy_lite:
82+
needs: build_lite
83+
if: github.ref == 'refs/heads/main'
84+
permissions:
85+
pages: write
86+
id-token: write
87+
88+
environment:
89+
name: github-pages
90+
url: ${{ steps.deployment.outputs.page_url }}
91+
92+
runs-on: ubuntu-latest
93+
steps:
94+
- name: Deploy to GitHub Pages
95+
id: deployment
96+
uses: actions/deploy-pages@v4
97+
5798
test_isolated:
5899
needs: build
59100
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)