Straight to the point: a bird's-eye view of the system architecture:

Automating deployments with GitOps
I use Bitbucket and GitHub for my Git repositories... GitHub for anything public, and Bitbucket for private stuff. The deployment flow is simple: as soon as a tag is created, and because the repositories are mirrored to Cloud Source Repositories, it triggers a build pipeline on Cloud Build.
CI/CD with Cloud Build and Container Registry
Cloud Build takes the code, builds the container images, pushes them to Container Registry, and deploys the API to Cloud Run.
Control API running on Cloud Run
To kick off a recording of a show, you just call the API with the target URL and the system queues up the job. Everything runs on Cloud Run, a serverless platform that lets you spin up an app simply by providing a container image that listens on HTTP. When the app isn't being called, it costs nothing, which is a huge money-saver when a system isn't running 24/7.
A job queue backed by Firestore
Since GCP's free tier is pretty generous with Firestore, this serverless NoSQL database is used to store settings and, most importantly, the status of running jobs.
Preemptible VMs and Cloud Scheduler
Once the API writes the job to Firestore, Cloud Scheduler periodically pings the same API to check if there are pending jobs, and specifically, shows to record. If there are, the API spins up a new virtual machine. Those VMs use the preemptible class, which slashes the price dramatically, with the catch that Google can reclaim the machine at any time, so there's no guarantee a recording finishes on the first try. The trick is simply making sure a fresh VM picks up the slack if one gets preempted, and Bob's your uncle.
