Deploying the Visualization - reichlab/covid19-forecast-hub GitHub Wiki
There are multiple ways to deploy the visualization code. One way is to run it locally and commit the new files to gh-pages. The other way is to run the Deploy to Github Pages
Github Action to do the same through CI. The next 2 sections describe these 2 methods.
Deploying the visualization through Github Actions.
- Build the visualization locally. For this, you can run the
Update local visualizationworkflow to build the latest visualization code tomaster. - After the build is run, you can check the visualization by pulling the latest changes (
git pull) and runningnpm run devon the terminal to serve the changes on a local webserver (you can open http://localhost:8810 after running the command). - If everything looks good, run the
Deploy to Github Pagesworkflow. This command will publish the changes to Github Pages and deploy this to the live website
Deploying the Interactive Visualization locally
-
Check the local build of the visualization.
-
Push new visualization to master
# cd to root of repo
git add .
git commit -m "update local visualization"
git push
Now, the local built files are pushed to master.
- Check the visualization. THIS WILL be the visualization that is deployed, so make sure it's working!
cd visualization/vis-master/dist # from the root directory
python3 -m http.server
- Push the new visualization to the
gh-pagesbranch
npm run deploy-origin