Deploy React App in GitHub Pages

Deploy your create-react-app to GitHub pages.

1. GitHub Account
2. Git installed on your system.
3. Node J.S ( Latest Stable Version)

Now you need to open package.json file and add on the top of the file.

Replace {username} with your github username and {repo-name} with respective repository name.

Now in package.json file under existing scripts property we to need to add the following:

After you push these changes to your GitHub repository. Run the following command.

This will create a branch named GH-pages which will host your app. Under repository settings, you may make custom changes

Hope you enjoyed it.

Write to us,



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abir (@imabptweets)

I love to build,innovate and write about software from its scalability to its design. Also passsionate about Dev-Advocacy. DMs open: