- VS Code terminal: go to the project folder you will upload to github
- VS Code terminal: git init
- create a new repository in Github
recommend! make the name of repository the same “name” of package.json file - VS Code terminal:
git remote add origin ‘repository address’
git add .
git commit -m “1.0 Initialization”
git push origin master - Github repository refresh to check if all the files are uploaded.
Deploying to Github pages
- VS Code terminal: npm i gh-pages
- package.json:
“homepage” : “https://inhwam.github.io/'name of repository’”
“scripts”: add below
“deploy” : “gh-pages -d build”
“predeploy” : “npm run build” - VS Code terminal:
npm run build
npm run deploy
If you make any changes in files, run npm run deploy again.