[Feature]
pratikkabade opened this issue · 0 comments
pratikkabade commented
Publish React project to GitHub Pages
In here
Content
-
Install the
gh-pages
npm packagenpm install gh-pages --save-dev
-
Add a
homepage
property to thepackage.json
file{ "name": "my-app", "version": "0.1.0", + "homepage": "https://userName.github.io/repositoryName", "private": true,
-
Add a
predeploy
property and adeploy
property to thescripts
object:"scripts": { + "predeploy": "npm run build", + "deploy": "gh-pages -d build", "start": "react-scripts start", "build": "react-scripts build",
-
Deploy the React app to GitHub Pages
npm run deploy