So, a little back story: I have a Discord server that my fiance and I use to update each other and keep each other in the loop on stuff. At least that was its intended use, it’s been a bit stale and dead for a while now, except for one specific channel - the one I use to ping her when I make a new blog post.
I know, I know, you’re probably sitting here thinking “Kale, why do you need to ping her? Doesn’t she live with you?”. Yes, but I’m usually in the office and she’s in the bedroom on the other end of the house and I’m too lazy to get up and tell her I made a new post, and she probably wouldn’t read it otherwise since the blog isn’t really a place anyone spends much time. So, ping Discord was the way to go.
Originally, back in like 2022 or 2023 or whenever the blog had its last big overhaul, I was using Integromat and its actions system to watch for a push to a repo and then ping a channel. It worked great, had no issues with it, did what it said, and that was that. Well, until yesterday when I was updating that whole pinging process because the blog now lives in a new repo and needs to have a different thing to watch. I discovered that Integromat is now Make and the actions system has changed a little and I can no longer easily make it do what I needed. That’s where Github Actions comes in.
So I’m no stranger to Github actions, I’ve used actions on Gitea like once, so I felt pretty confident in my abilities to put something together. An hour and 10 failed runs later I had a working actions workflow. Now anytime I make a push to my local Gitea repo, since it’s mirrored to also push to Github, the workflow kicks off and sends a custom message to a specific channel in the Discord server via a webhook. Works like a charm.
I can see absolutely no way this could go wrong. Surely the fact that I sometimes make edits and pushes that aren’t posts won’t matter, right? Yeah, that’s the thing. I need to eventually dig a little deeper and see if I can get more granular with the thing that sets off the ping so that it only does so on a new post. I could probably solve this by just making dedicated branches and, you know, actually doing proper CICD, but who wants to do that? Certainly not me. Branches are for trees, after all :)