Oct 26, 2026
The requirement was simple: whenever I publish something or make a change to my website, my subscribers should be notified.
I asked my AI assistant to help me with it.
What I got was a bash script, a sudo rule, and a cron job. I copied them over, pushed a change, and checked the logs. It said deployed. A few minutes later, the email arrived.
That was it. I had spent more time thinking about the problem than it took to get the first version working.
The script runs every ten minutes and checks whether the latest commit on GitHub is the same one my server is running.
If nothing has changed, it exits. No deployment, no emails, nothing.
Most of the time, that's all it does. It wakes up, checks GitHub, and goes back to sleep.
I like this approach because there's not much to maintain. I didn't need a webhook endpoint or another service running somewhere. Just a script and a cron job.
When there's a new commit, the script pulls the changes and restarts my website's service.
These were the same commands I used to run manually over SSH. Now I don't have to.
There was one small problem with permissions. Cron can't stop and ask me for a sudo password, so I added a rule that allows it to restart this particular service without asking for one.
Nothing beyond that. I didn't want a scheduled script running with more permissions than it needed.
This was the part I actually wanted.
My website already has a small index.yaml file that keeps track of my posts. Before pulling the latest changes, the script saves a copy of it. After the pull, it compares the old list with the new one and finds any posts that have been added.
For each new post, it reads the title and calls the notification command already included in my site's code. That command sends an email to subscribers with the title and a link.
So if I change some CSS or fix a bug, nothing goes out. If I publish a post, subscribers hear about it.
There's no need to inspect commit messages or figure out which files changed. The difference between two versions of the post list is enough.
I probably would have spent a weekend building something more elaborate if I'd approached this without thinking much about it. Instead, the solution was to compare two text files.
There's also a small detail that would have caused an annoying problem. On the first run, there is no previous list to compare against. Without a check for that, the script would treat every existing post as new and email the entire archive to my subscribers.
So the first run just deploys the site and stays quiet.
There's no extra service to pay for and no new platform to maintain. I write a Markdown file, add an entry to my index, and push the changes. Within ten minutes, the post is live. If it's new, the email goes out.
The thing I appreciate most is that I don't have to think about any of this anymore. Publishing is just publishing.
The AI assistant helped me put the pieces together, but the solution itself isn't particularly clever. It's a few commands doing their jobs, scheduled to run when I'm not around.
I think that's what I want from AI in my own work. Not necessarily something that builds a whole new system, or turns every small problem into a project. Sometimes I just need help getting a repetitive task out of the way.
This time, a bash script and a cron job were enough.