Deploy your dashboards easily to github pages through converting your python code to web assembly language. Once converted r=the dashboard is then deployed to git hub and will run real time on any browser that opens that deployment link. This is a new promising technique that will make us not need server based deplyments.
My deployment that is live based on your class activities: Press Me
Please follow instructions in your terminal as follows:
conda create -n testing python=3.7
conda activate testing
conda install -c pyviz hvplot geoviews
pip install -r requirements.txt
- Create new github repo
- Clone your public repo locally and cd into it
- Copy everything from Instructor-Extra-Resources/Deploy_Dashboards and paste in your local repo
- cd into github folder you just pasted everything inside too
- Type in the terminal
touch .nojekyll
conda activate testing
- cd into src and cd into a project off your choice
panel serve script.py --autoreload
panel convert src/project-name/script.py --to pyodide-worker --out docs/project-name
for each project you have in src folder- git status --> git add. --> git commit -m "..." --> git push
- Go to your github repo where you pushed too and press Settings as shown below:
- Press on pages tab as shown below:
- Press under branch and select main as shown below
- Change /root into /docs as shown below
- You are all set!! Refresh the page and wait few minutes and then you can acess your deployments but dont press the link below as it will give 404 error:
- Deployment links should look like this:
https://YOUR_GITHUB_USERNAME.github.io/YOUR_GITHUB_REPO/hello-world/script.html
https://YOUR_GITHUB_USERNAME.github.io/YOUR_GITHUB_REPO/compose-plots/script.html
https://YOUR_GITHUB_USERNAME.github.io/YOUR_GITHUB_REPO/portfolio-optimizer/script.html
Offcourse replace YOUR_GITHUB_USERNAME
& YOUR_GITHUB_REPO
with your username and what you names your repo respectively!
Please fast forward when necessary: Deploy Demo Recording
Panel Release for the Intiative
Highly Recommended!!: Dashboard Examples with Source Code