Add homepage to package.json
"homepage": "https://{user_name}.github.io/{repo_name}/",
Install gh-pages package
npm i gh-pages
Replace all '/' in the app with process.env.PUBLIC_URL
example, from:
<Link to='/'>Home</Link>
to
<Link to={process.env.PUBLIC_URL}>Home</Link>
Add these under scripts in package.json
"predeploy": "npm run build", "deploy": "gh-pages -d build"
Run npm run deploy
and your site should be on
https://{user_name}.github.io/{repo_name}