Gitea, Drone CI, Hugo and Auto-deployment

By chimo on (updated on )

Note: This is an update to my previous blog post "Git, Gogs, Jekyll and Auto-deployment" since I've changed things up in the last four years.

The Static Blog Generator

I've switched to Hugo from Jekyll. A few reason are:

  • Hugo seemed to generate the static files faster (I didn't run benchmarks or anything)
  • A single Go executable is easier to manage than Ruby environments (and the `bundle` thing, or whatever -- I don't really care)
  • The Hugo file structure seems cleaner (although that might just be me having more experience with static site generators overall)

Publishing

I still just push to a git repository to trigger an update to the blog. I've switched my self-hosted git platform from Gogs to Gitea, however. The main reason is that, the development on Gogs stalled for a while and the community had some interesting ideas on the roadmap I wanted to play with.

The Hook

Instead of calling a local custom script on the post-receive git hook, I'm using Drone CI to run `hugo` and `scp` the results over to the live blog.

Since I'm switching everything to LXC containers, the blog and Gitea are in separate "environments" so I can't rely on the old post-receive git hook on Gitea to build the blog on-the-fly. Plus, this task is perfect for a CI pipeline and I've wanted to set something like this up for a while now. I'll probably end up using the pipeline for other things too.

Recent articles from blogs I follow

The Scunthorpe Problem

I was talking with a friend recently about an email of theirs running afoul (🐔) of another aggressive filter system, because they dared to to talk with someone called Dickson. I know right, they’re the absolute worst. For those unfamiliar, this is the The…

via Rubenerd November 21, 2024

In which Neil is surprised by the lack of an HDMI cable

Some modern technology decisions baffle me. Today, I was sitting in a meeting room. In the room was my friend, with her laptop. Her laptop has an HDMI port. Also in the room was a screen, onto which my friend wished to display her laptop’s desktop. The screen …

via Neil's blog November 19, 2024

Helm: JSON schema generation

Helm charts support the inclusion of a values.schema.json file to validate values.yaml. Documentation: https://helm.sh/docs/topics/charts/#schema-files A JSON schema is akin to defining the structure of and type-annotating a JSON file. It helps to “shift lef…

via not just serendipity November 14, 2024