I changed my username (See About) on Twitter and GitHub recently. Then, my updates to the blog won’t be examined by GitHub Pages. Worse is better, maybe it’s a chance for me to migrate the site on my DigitalOcean VPS. However, I still want to manage my source code on GitHub, tracing the change log and not necessary to worry about data loss.
The tasked is divided into three sections:
- Listen to the changes (Git Push) on GitHub.
- Pull new changes from GitHub to VPS.
- Generate the site from source codes.
For step 3, since my blog has to be generated by Jekyll and the repository on GitHub is just source code, the VPS has to execute
jekyll build command after receiving git updates. But I met with some problems here due to Ruby and Jekyll. Again, worse is better. I thought about Hugo, which is a much faster generator written in Go. So I replaced Jekyll and refactored my blog, but it’s a painful process because it’s unfriendly to implement some logic with Hugo. Regardless, the blog you are reading is made by Hugo now.