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

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more