Wednesday, September 15, 2021

npm deploy React App to GitHub

package.json

"homepage": "https://USERNAME.github.com/my-app"

"scripts": {

"predeploy": "npm run build",

"deploy": "gh-pages -d build"

}


git init

git remote add origin git@github.com:USERNAME/my-app.git

npm run deploy //=== yarn deploy

git add . //=== git add -A

git commit -m "Your awesome message"

git push origin master 

No comments:

Post a Comment