This repo contains step to step process on how to deploy react app to github pages
Follow this link to create new repo
Install "gh-pages" package using the below command.
npm install gh-pages --save-dev
homepage": "https://{username}.github.io"
Add both predeploy and deploy property scripts to the package.json file as below,
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
The "predeploy" command is used to bundle the react application and the "deploy" command helps to deploy the bundled file.
..* Initialize the Git using "git init" command. ..* Add it as remote using "git remote add origin your-github-repository-url.git" command.
Now run the below command to deploy your react application to GitHub Pages.
npm run deploy
To get the published URL,
..* Go to your GitHub Repo. ..* Click Settings menu.