DEV Community

Faisal Ahmed
Faisal Ahmed

Posted on

2 1

Deploy React Project in Github

Image description

  • first, create a github repository
  • secondly, push the react project in that repository
  • thirdly, install below package
npm install gh-pages --save-dev
Enter fullscreen mode Exit fullscreen mode
  • fourthly, add below two code on package.json file.
"homepage": "https://webfaisalbd.github.io/deploy-demo",
Enter fullscreen mode Exit fullscreen mode
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
Enter fullscreen mode Exit fullscreen mode
  • fifth, add below code in vs code
npm run deploy
Enter fullscreen mode Exit fullscreen mode

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)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay