Forked from ciamac-da/gist-09-github-deployment-react.txt
Created
August 25, 2021 07:16
-
-
Save delafuentej/adb6130c4f231fb3f75f0db34a8833c4 to your computer and use it in GitHub Desktop.
This is how to deployment React projects on Github
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1- Open package.json file and add a homepage at the top before name | |
| ==> "homepage": "https://<USERNAME>.github.io/<PROJECT NAME>", | |
| 2- install gh-pages using ==> npm i gh-pages | |
| 3- Add pre-deploy and deploy to scripts ==> | |
| "pre-deploy": "npm run build", | |
| "deploy": "gh-pages -d build" | |
| 4- type npm run pre-deploy in terminal | |
| 5- type npm run deploy in terminal | |
| 6- It's Done!:) click on homepage link to see published version of your project! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment