Set the base on *vite.config*
Create .github/workflows/deploy.yml
& add below codes
Create a new Repository on GitHub and Initialize Git
Activate Workflow Actions on GitHub
Install React Router
Specify the homepage in *package.json*
Create the *404.html*
file in the public folder
Add the script below inside the head tag in *index.html*
Push to GitHub
Original Repository: https://github.com/ErickKS/vite-react-router