Deploy a React App to Github Pages

Posted on January 21, 2021

You're wondering how to change the build folder name and the local dependencies path in the HTML in order to deploy correctly on Github Pages when using create-react-app?

Just add in package.json the homepage field with the full base remote URL of your App, such as:

"homepage": "https://fabiofranchino.github.io/my-react-repo-app"

And push the gh-pages branch, or use this dependencies gh-pages following this tutorial.

Want to interact? Reach me out on Twitter
Spotted a typo? Send a patch