Skip to content

fix: use PyodideAddon (not PyodideLiteAddon) for kernel config #8

fix: use PyodideAddon (not PyodideLiteAddon) for kernel config

fix: use PyodideAddon (not PyodideLiteAddon) for kernel config #8

name: Build JupyterLite
on:
push:
branches: [main]
paths:
- 'jupyterlite/**'
- '.github/workflows/jupyterlite-build.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build JupyterLite distribution
working-directory: jupyterlite
run: |
pip install -r build_requirements.txt
jupyter lite build \
--config jupyter_lite_config.json \
--piplite-wheels requirements.txt \
--contents notebooks \
--output-dir dist
- name: Inject NKZ auth init script
working-directory: jupyterlite
run: python3 inject_nkz_init_into_lab_html.py
- name: Copy Micro-SDK to distribution
working-directory: jupyterlite
run: |
mkdir -p dist/files
cp nekazari.py dist/files/nekazari.py
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: jupyterlite-dist
path: jupyterlite/dist/
retention-days: 30
# MinIO upload (requires repo secrets: MINIO_ENDPOINT_URL, MINIO_ACCESS_KEY, MINIO_SECRET_KEY)
- name: Deploy to MinIO
if: github.ref == 'refs/heads/main'
env:
MINIO_ENDPOINT_URL: ${{ secrets.MINIO_ENDPOINT_URL }}
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
set -euo pipefail
if [ -z "${MINIO_ENDPOINT_URL:-}" ] || [ -z "${AWS_ACCESS_KEY_ID:-}" ] || [ -z "${AWS_SECRET_ACCESS_KEY:-}" ]; then
echo "::warning::MinIO secrets missing (MINIO_ENDPOINT_URL / MINIO_ACCESS_KEY / MINIO_SECRET_KEY). Skipping deploy."
exit 0
fi
pip install -q awscli
EP="${MINIO_ENDPOINT_URL}"
aws --endpoint-url "${EP}" s3 sync jupyterlite/dist/ "s3://nekazari-frontend/jupyterlite/" \
--delete \
--cache-control "public, max-age=3600"
aws --endpoint-url "${EP}" s3 cp "s3://nekazari-frontend/jupyterlite/" "s3://nekazari-frontend/jupyterlite/" \
--recursive --exclude "*" --include "*.wasm" \
--cache-control "public, max-age=31536000, immutable" \
--metadata-directive REPLACE