From 034cc19959f62137cf3d09a7c46eb1f444700de7 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Fri, 30 Aug 2024 14:02:30 +0100 Subject: [PATCH] feat: JupyterLite integration --- .github/workflows/build_site.yml | 9 +++++++++ .gitignore | 2 ++ _config.yml | 4 ++++ requirements.txt | 4 ++++ 4 files changed, 19 insertions(+) diff --git a/.github/workflows/build_site.yml b/.github/workflows/build_site.yml index e04b183e..a0cb54d9 100644 --- a/.github/workflows/build_site.yml +++ b/.github/workflows/build_site.yml @@ -49,6 +49,15 @@ jobs: bundle install - name: Build website run: bundle exec jekyll build + - name: Build the JupyterLite site + run: | + rm -rf `find . -type d -name .pytest_cache` + rm -rf `find . -type d -name .ruff_cache` + rm -rf `find . -type d -name .doctrees` + mkdir content + mkdir _site/jupyter-lite + cp -R ch*/*.ipynb content + jupyter lite build --contents content --output-dir _site/jupyter-lite - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/.gitignore b/.gitignore index 5c38a65a..a81ed34e 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,5 @@ session04/greetings/scripts/ Gemfile.lock .env/ polynomials.svg +content/ +.jupyterlite.doit.db diff --git a/_config.yml b/_config.yml index ef3446e7..4ed49de6 100644 --- a/_config.yml +++ b/_config.yml @@ -36,3 +36,7 @@ exclude: - "*/*.v2.ipynb" - "combined_files" - "combined.ipynb" + - jupyter-lite + +keep_files: + - jupyter-lite diff --git a/requirements.txt b/requirements.txt index 6cc06824..748fa3a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,3 +26,7 @@ pycodestyle pylint webcolors ruff +jupyterlite-core==0.4.0 +jupyterlab~=4.2.4 +notebook~=7.2.1 +jupyterlite-pyodide-kernel==0.4.1