- first, create a github repository
- secondly, push the react project in that repository
- thirdly, install below package
npm install gh-pages --save-dev
- fourthly, add below two code on package.json file.
"homepage": "https://webfaisalbd.github.io/deploy-demo",
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
- fifth, add below code in vs code
npm run deploy
If you add some code,
then push the code in github again,
then, write,
npm run deploy
and get the changed code.
Top comments (0)