I followed this guide to get gh-pages working with vite.
To replicate this:
- Name the main branch
main
- copy the contents of
github/
directory into in the new project - in
vite.config.js
add the base direcory to be the repository name like sobase: '/vite-pages-demo/'