concept-collection / jupyterlite-numbl-kernel
jupyterlite-numbl-kernel / .github / workflows / deploy.yml
54 lines · 1.3 KBBlameHistoryRaw
1name: Build and Deploy Demo Site
3on:
4 push:
5 branches: [main]
6 workflow_dispatch:
8jobs:
9 build:
10 runs-on: ubuntu-latest
11 steps:
12 - name: Checkout
13 uses: actions/checkout@v4
15 - name: Setup Node
16 uses: actions/setup-node@v4
17 with:
18 node-version: '22'
20 - name: Setup Python
21 uses: actions/setup-python@v5
22 with:
23 python-version: '3.12'
25 - name: Install site requirements and the kernel extension
26 run: |
27 python -m pip install -r demo/requirements.txt
28 python -m pip install .
30 - name: Build the JupyterLite site
31 run: jupyter lite build --lite-dir demo --contents content --output-dir dist
33 - name: Make the site cross-origin isolated (enables interrupt)
34 run: node demo/inject-coi.mjs dist
36 - name: Upload artifact
37 uses: actions/upload-pages-artifact@v3
38 with:
39 path: ./dist
41 deploy:
42 needs: build
43 if: github.ref == 'refs/heads/main'
44 permissions:
45 pages: write
46 id-token: write
47 environment:
48 name: github-pages
49 url: ${{ steps.deployment.outputs.page_url }}
50 runs-on: ubuntu-latest
51 steps:
52 - name: Deploy to GitHub Pages
53 id: deployment
54 uses: actions/deploy-pages@v4