Manual deploys

This website has been deploying using a GitHub Action for a little while now. The idea is that when I push new changes, the website should pull those changes down from GitHub and then do a little song and dance to install dependencies and bust caches. Simple enough.

Or so you'd think! I struggled for a while to figure out a good way to handle this—using Deployer, trying to find a cheaper alternative to Forge, finally settling on what felt to me like a bit of an icky method: getting GitHub to SSH directly into my VPS and run the commands. This necessitated putting credentials in a GitHub "Secret", which I'm sure has top-notch security but felt like an unnecessary broadening of my attack surface.

Well, no longer. The GitHub Action, after 250-odd runs, is no more. Instead, I've written a simple bash script that runs the deployment commands, and which I trigger from my computer instead. Manually SSH-ing into my server and running the command explicitly would be tiresome, so I've written a small alias for it instead:

alias deploy='f() { ssh <my-server> "cd /path/to/www/$1 && ./deploy.sh" };f'

which I can then run pretty simply:

$ deploy charlesharri.es

There are a few benefits to doing it this way:

#3 is the big one for me; time will tell how much more or less productive this workflow actually is. I suspect it's not going to make much of a difference.

Web

Next

Wrekenton XC

My first outing at a cross-country running event. Rain before, mud during, and lots of cake directly afterwards.

Previous

Fujichia

A website that is actually a spooky castle that you can go visit from the comfort of your very own personal sofa.