Struggling to deploy voila or voici on github

I am able to see the outputs of voila or voici on my Desktop.How can I deploy it to my GitHub using index.html?I have tried changing .ipynb file to .html and deploy but it deploys it as code but not as output?

Not following what you mean because neither Voila or Voici would involve index.html?

It would help to talk specifics here. Voici is the most direct to deploy on GitHub Pages as it is supported and there is a guide. (The newer guide is here. I have used it to make several tests you can access from the link here.) However, while it mostly works, Voici development is still at an early stage and has several quirks. JupyterLite deployed on GitHub pages though is more developed and so if you don’t mind the code showing, it would be a better route for deploying useable strategies via GitHub pages these days. If you can use it, I’d recommend the xeus-python + JupyterLite demo because it supports pre-installing packages and so more stuff will work on start-up for your users without them needing to run install commands. I have used that to make my own repo here where ipycanvas works in sidecar to give a flavor of the possibilities. The guide for the pyodide-flavor of JupyterLite is here. You can try it in your browser using this link to get a feel for the possibilities and approaches needed.

Last I knew Voila wasn’t supported on GitHub Pages because it needs an active kernel and so a static site deployment, like GitHub pages, won’t work. If you want to use temporary MyBinder-served remote machine sessions to serve your repo, you can use Voila though fairly easily. I have several examples working here. The first example under ‘Direct Links’ there should work if you click on it and are patient, as I just tried it and it is confirmed working fine at present. (Alternatively, click here.)

So the two are very different and so conflating them in a single post is just adding to confusion about what you really want help with?

2 Likes

So voici or voila doesn’t need index.html to deploy. What are the files needed for the binder?

On the sample repos page of the Binder documentation, there’s a section ’ Interactive dashboard from notebook with Voilà’. If you examine the URL for the launch badge, you’ll see the demonstration repo is here. (It seems to be an oversight that there is no direct link to that repo, as there is for all the other examples.) That sample Voila repo should give you a good idea of what are the files needed to be used for deploying Voila from a repo on Github using MyBinder. In fact, it is even easier because you can just use that repo as a template to make a new repo. If you do that and edit the code to change the launch URL(s) for the badges accordingly, launches should work from your new repository that you’ll get using that as a template. (Just tried that here and you can look at the commits to follow the steps that happened).) Then you can further edit the content and packages to start to match what you need.
That section also links to Voila’s documentation on deploying to Binder.

1 Like