Deploying a React App* to GitHub Pages
npm install gh-pages --save-dev
package.json
//...
"homepage": "http://gitname.github.io/react-gh-pages"
//...
"scripts": {
//...
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
git init
git remote add origin https://github.com/gitname/react-gh-pages.git
npm run deploy
git add .
git commit -m "Create a React app and publish it to GitHub Pages"
git push origin master