Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vigneshwaran-chandrasekaran/8e336d1bf45ba9d7be01c771becda7d0 to your computer and use it in GitHub Desktop.
Save vigneshwaran-chandrasekaran/8e336d1bf45ba9d7be01c771becda7d0 to your computer and use it in GitHub Desktop.
deploy react app to github page
/*
In package.json file create property called "homepage" and add public github page url
e.g. "homepage": "https://vigneshwaran-chandrasekaran.github.io/react-router-v5/"
then install
npm install gh-pages --save
then add below scripts in package.json
"scripts":{
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
}
then deploy the code using npm run deploy
Once you successfully deployed open your GitHub code repository and click on settings
tab if you scroll down you can see a GitHub Pages then choose a branch to gh-pages.
// https://reactgo.com/deploy-react-app-github-pages/
*/
@bobbari
Copy link

bobbari commented Jul 11, 2020

awsome, good information, thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment