Deploy WASM-converted Notebooks to GitHub Pages (Pyodide)

I found that the examples in the App Gallery now all feature a “Launch Pyodide” button that will open the a purely browser-based WASM version of the visualization. While some seem to be broken at the moment (cf. #5521), some (like the Portfolio Optimizer) work great.

There is also documentation on how to convert Panel notebooks to WASM html files.

However, I was wondering what the suggested deployment workflow for these WASM pages would be?

It seems that the Panel documentation uses an enterprise version of the Anaconda cloud to host the gallery files. The examples are hosted at pyodide_url = ''. GitHub pages seems like the method of choice for the larger userbase.

Could this be a custom GitHub actions workflow that:

  1. Runs panel convert mynotebook.ipynb --to pyodide-worker --out pyodide to generate an html file.
  2. Deploys the resulting mynotebook.html using the upload-pages-artifact workflow


I would be happy to contribute to the documentation as soon as some experts have weighed in :innocent:

1 Like

What I know about panel convert and github pages is described in How to Deploy a Panel Visualization Dashboard to GitHub Pages | by Sophia Yang, Ph.D. | Towards Data Science.

Thank you - that provided a very nice starting point. I found the best approach to convert the Panel application locally and deploy it to GitHub pages using the basic static HTML deployment workflow deploy.yaml provided by GitHub.