Code for helloalinato.com
This project was bootstrapped with Create React App.
Deployed via Github Pages and gh-pages
npm package.
Use yarn
! We love yarn
.
[Updated 08-14-2020]
Make sure Source
branch is set to gh-pages
and not master
yarn start
- http://localhost:3000
develop
is our safe and stable branch with all the code.
- Create
feature
branch offdevelop
- i.e.
shop
branch
- i.e.
- Do development work on
feature
branch - When finished adding new changes, on
feature
branch:git add .
git commit -m "added cool new feature"
git push origin
feature`
- Create Pull Request to merge
feature
intodevelop
Now we don't do anything with develop
! It's the safe branch with most current code.
- On
feature
branch:yarn run deploy
- This will create a
/build
folder with static files and agh-pages
branch. It will also push that up to Github automatically -- Nothing for me to do except runyarn run deploy
!
- This will create a
- On Github repo > Settings:
- Scroll down to "Github Pages" section
- Make sure
Source
isgh-pages
at /root folder - Update custom domain to
helloalinato.com
and hit Save- It resets to
github.io
each time for some reason...
- It resets to
A while ago, Github Pages only allow you to develop and deploy from master
branch only. When deployment happens, it only cares about static files. So whenever something is pushed to master
branch, it automatically strips everything that is not static files (i.e. package.json, README.md...)
Then, when you pull from master
, or branch off master
, all your work is gone. Why? I do not know.
Whatever you do, DO NOT:
- DO NOT pull from
master
- DO NOT create
feature
branch offmaster
- Basically, NOTHING happens on
master
and it only has static files. So if you pull frommaster
intodevelop
orfeature
, all your hard work will be gone!