markjgsmith

2023/11/08 #

I've spent today re-organising the Github Actions I use to build and deploy my static site generator and it's plugins. There are a lot of repos and the workflows are all quite similar but they tend to diverge over time and it gets quite complicated to manage.

The solution was to extract any steps that were longer than a couple of lines of bash into seperate bash scripts. Then put all these in a scripts repo. The workflows now clone this repo at the start and use the scripts within as the workflows unfolds. The big advantage is the scripts are in one place, no code duplication, nothing to go out of sync. When I change the scripts all the repos get that change.

I can't tell you how much better that is. Also the workflows have become much much shorter so they are much easier to reason about. When you start out on a project it's the sort of thing that isn't always obvious. It's only after creating the workflow many times over that you see the commonality between them. It takes several iterations to refactor so there is code that can be reused in many places, rather than lots of custom bits of logic everywhere.

These sorts of improvements are great, they feel stabilising. #

Today’s links:

  • The OpenAI Keynote - I feel like I haven't read many articles from Stratechery in the last few months. The idea in this article, and I've heard it echoed elsewhere, is that the frontier in developer conferences is in AI. OpenAI is the new Apple WWDC. I have to say, though I am definitely often very impressed with the things these AIs can do, I'm just not super interested by it. I find myself scrolling through, reading a bit here, and a bit there. Maybe it would be different if I could get involved in some way. It all feels just out of reach to me. Other people's fun. Nice and I'm happy others are having fun, but ultimately, from my perspective, it's dull and boring. stratechery.com #

For enquiries about my consulting, development, training and writing services, aswell as sponsorship opportunities contact me directly via email. More details about me here.