Host React app with GitHub Page for free

Before we start…

npm install gh-pages --save-dev
"homepage": "https://<username>.github.io/<repository>"
"scripts": {
//...
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
npm run deploy
This is my web app hosted on https://abbylow.github.io/lottery-frontend/

The changes in GitHub repository

gh-pages branch

Something to take note

--

--

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
Abby Low

Abby Low

Software engineer, dreamer, another cat lover. Just share what I’ve learned.