Migration to Cloudflare
I did not really like the fact that the free-tier GitHub account requires the repo for the GitHub Pages to be public. While looking for an alternative, I found out that Cloudflare could take a private GitHub repo, build it if needed and then deploy the result for free. This seems ideal.
The process to set up a Cloudflare page was rather straight forward. Actually, I think its workflow is more intuitive than the GitHub one. Soon enough, I ran into the issue of not having ImageMagick installed in the build environment that Cloudflare uses. Googling on this issue led me to this webpage. The solution was to add an environment variation UNSTABLE_PRE_BUILD to the build configuration with a value as below since the v2 build system have ImageMagick removed.
asdf plugin add imagemagick && asdf install imagemagick 7.1.1-15 && asdf global imagemagick 7.1.1-15
This seemed to work but it took 7~8 minutes for the ImageMagick package to build from scratch, which drastically increased the build time of each commit. Obviously this is not an acceptable workflow. I then realized that Cloudflare can simply grab the output of the Jekyll build on GitHub, which is posted to the gh-pages branch. The best of both worlds.
Enjoy Reading This Article?
Here are some more articles you might like to read next: