I just learned about TravisCI (actually, about continuous integration (CI) in general) after attending Neurohackademy 2018. We learned about CI from the perspective of ensuring that your code builds properly when you update files in your packages, incorporate new methods, refactor your code, etc. Pretty neat.
Fast forward a couple days, and I’m trying to incorporate custom Jekyll plugins into my blog – I quickly realized GitHub doesn’t allow this for security reasons, but I couldn’t find a convenient work-around. Some posts suggested using a separate repo branch to build the site, and then push the static HTML files up to a remote repo to do the actual hosting, but for some reason I couldn’t get that approach to work.
Finally, I saw some mentions of using TravisCI and CircleCI to build and push the site using continuous integration. I ended up using the approach suggested by Josh Frankel.
Josh’s site gives a really clear explanation of the necessary steps, given some very minmal prequisite knowledge about using Git. His instructions actually worked almost perfectly for me, so I won’t repeat them again here (just follow the link above, if you’re interested) – however, there were a few issues that arose on my end:
For some reason, I had an about.html
file and index.html
file in the main repo directory – my built blog wouldn’t register any updates I made to about.md
or index.md
while these files were around, so I deleted the HTML files. This might have been an obvious bug to someone with more web programming experience, but I’m a novice at that. If you’re seeing any wonky behavior, check to make sure you don’t have any unnecessary files hanging around.
Ruby version: I had to change the version of Ruby I was using to ruby-2.4.1
.
Plugins: Make sure any Jekyll plugins you want to use are already installed.
Emails: You can turn off email reporting from TravisCI by adding
notifications: email: false
to your .travis.yml
file.
But now, you can incorporate custom, user-built Jekyll plugins and let TravisCI do the heavy lifting! I specifically wanted the ability to reference papers using BibTex-style citation links with Jekyll, like you can with LaTex or Endnote – this capability isn’t currently supported by GitHub. Happy blogging!