deploy react to github pages
hello bro today I will share you a way publish react application with github pages.
Let's follow me !!
step 1:
install package gh-pages
yarn add gh-pages -D
step 2:
add config gh-pages in package.json
2.1 open package.json change homepage
"homepage": "http://tomnyson.github.io/vercel-demo",
change tomnyson = your account github
change vercel-demo = your projec name github
2.2 add code in block scripts
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
*2 line code above show react build before deploy *
2.2 deploy code
yarn deploy