Table of contents
No headings in the article.
Vite Blazing fast!
(vitejs.dev)
Here are some simple steps when uploading the project to Github(gh-pages)
(1) Making the repo either directly on Github or via Github desktop
(2) Push your code
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/USERID/NAME-OF-REPO.git
git push -u origin main
(3) You may encounter some errors in this stage. See the below for the solution.
git remote -v
git remote remove origin
// This is to start fresh
git push origin +main
// to push to main again
(4) Modify vite.config.js
by adding the name of your repo in the file. (See the red arrow below)
(5) Deploy to gh-pages
npm run build
git add dist -f
git commit -m "Adding dist"
git subtree push --prefix dist origin gh-pages