Go slowly   About  Contact  Archives


A new year has come, guess what, I made a new blog. Yay!

This blog is powered by Hugo and hosted by GitHub. I modified the deployment script a little bit to use 2 braches in 1 repo instead of 2 repos. It looks like this:

Update: We got GitHub actions now.


# 0. Notify & get message
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
msg="Rebuilding site `date`"
if [ $# -eq 1 ]
  then msg="$1"

# 1. Commit changes to develop first
git add .
git commit -m "$msg"

# 2. Build the project in develop

# 3. Checkout to master
git checkout master

# 4. Add changes to master
cp -r public/* .
rm -rf public
git add .
git commit -m "$msg"

# 5. Push to develop & master
git push origin master develop

# 6. Come back to develop
git checkout develop

You can checkout the source code here.

Written on January 26, 2018.