personal website
npm start
to open up the localhost view.
- The repo should be public and named <your_github_id>.github.io
- npm install create-react-app
- npx create-react-app <your_github_id>.github.io
- cd <your_github_id>.github.io
- npm start // just to check it out, make sure yarn and npm aren't being used at the same time!
- npm i --save @fortawesome/free-solid-svg-icons
- npm i --save @fortawesome/fontawesome-svg-core
- npm i --save @fortawesome/react-fontawesome
- edit package.json (e.g. "vim package.json")
- add "homepage": "https://<your_github_id>.github.io
- add "predeploy":
- add "deploy": "gh-pages -d build -b master"
- npm run build // creates a build folder
- copy the contents in the build folder and paste into the /<your_github_id>.github.io/ folder
- npm install gh-pages --save-dev
- make sure that you have github ssh setup! https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh
- push to github, setup as follows:
- git add .
- git commit -m "first build"
- git remote add origin
- git remote add origin https://github.com/simran-arora/simran-arora.github.io.git
- git push -u origin master
- git branch --set-upstream-to=origin/master
- move your repo to a second branch (e.g. name this "code", or "dev")
- git checkout -b dev
- git push -u origin dev
- go to the github repo --> enter settings --> enter branches --> set "dev" as default branch
- deploy your site: npm run deploy
If you're using yarn instead of npm, replace the commands:
- npm run build --> yarn build
- npm run deploy --> yarn deploy