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 field in package.json file ==> | |
| "pre-deploy": "npm run build", | |
| "deploy": "gh-pages -d build" | |
| 4- type npm run pre-deploy in terminal |
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- Add a new branch in your Project useing ==> git checkout -b gh-pages | |
| 2- Try to change at least one character of your project's files and save(you need this to be able to push again) | |
| 3- git add -A | |
| 4- git commit -am "deployment branch added" | |
| 5- git push --set-upstream origin gh-pages |
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
| # This is how to get rid of node_modules folder from Github! | |
| 1- Add .gitignore file(must be located in the root directory of your repo). | |
| 2- Write node_modules/ in .gitignore file. | |
| It means ignore all directories called node_modules in current folder and any subfolders. | |
| As alternative you can also use /node_modules or **/node_modules. | |
| ** is used for a recursive call in the whole project. | |
| 3- Open Terminal |