dailylog 7-12-20
How to host react app on Github pages
- Download gh-pages
yarn add gh-pages
- Add
homepagetopackage.json
"homepage": "https://aaroncaraway.github.io/umre-todo/"
- Update
scriptssection ofpackage.jsonto includepredeployanddeploy
"scripts": {
"start": "react-scripts start",
"predeploy": "yarn build",
"deploy": "gh-pages -d build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
-
!! IMPORTANT !! Run
yarn deploy -
In project repo on github, go to settings and host pages from
gh-pagesbranch