gh-pages is the package to go to deploy the repository to GitHub pages
- Add script to deploy
"scripts": {
"deploy": "gh-pages -d build"
}
- Deploy
npm run build
npm run deployIn the vite.config.js need to set the correct base URL.
If you are deploying to https://<USERNAME>.github.io/<REPO>/, for example your repository is at https://github.com/<USERNAME>/<REPO>, then set base to '/<REPO>/'