* created using create-react-app
In this tutorial, I'll show you how I deployed a React app—which I created using create-react-app
—to GitHub Pages.
You can visit the deployed app, at https://gitname.github.io/react-gh-pages/.
* created using create-react-app
In this tutorial, I'll show you how I deployed a React app—which I created using create-react-app
—to GitHub Pages.
You can visit the deployed app, at https://gitname.github.io/react-gh-pages/.
NOTE if using a custom subdomain like http://project-name.your-domian.com
change publicPath to '/'
module.exports = {
publicPath: '/name-of-your-project/'
}
npm run build
Remove local remote
git remote remove origin
Squash all git history into one commit
git checkout --orphan some-branch
git commit -m "First commit"
git branch -f master