Entry 7: viable.dev is LIVE! The Deployment Journey
Date: May 30, 2025
It's a pretty exciting milestone today – this very website, viable.dev, is now officially deployed and live! The journey to get here was a fantastic, hands-on learning experience, involving Google Cloud Storage (GCS), GitHub Actions for CI/CD, wrangling DNS with GoDaddy, and setting up a Google Cloud Load Balancer for robust HTTPS.
Phase 1: The Initial Plan - GCS & GitHub Actions
The first step was straightforward: create a GCS bucket to host the static HTML, CSS, and JavaScript files and configure it for public access. To automate updates, I set up a GitHub Actions workflow. This was my first dive into Workload Identity Federation (WIF) with Google Cloud, a more secure alternative to service account keys. It involved enabling a few APIs (IAM Credentials, specifically), creating a dedicated Service Account, and configuring a Workload Identity Pool to trust GitHub Actions. This allowed my GitHub repository to impersonate the Service Account securely for deployments. An early snag was an organization policy (iam.disableServiceAccountCreation
), which thankfully WIF helped navigate by allowing the use of an existing, approved service account.
Phase 2: Bucket Names, Restructuring, and DNS Ponderings
I initially named my GCS bucket viable.dev
. However, I quickly learned about the nuances of pointing apex domains directly to GCS via CNAME records, especially with GoDaddy, and the implications this has for HTTPS. To align with best practices and simplify things, I decided to "rename" the bucket by creating a new one – www.viable.dev
– and configured it for website hosting. All files were copied over, and the GitHub Actions workflow was updated to point to this new www
bucket. During this phase, I also caught a security oversight: my initial GitHub Action was uploading the entire repository, including .git
and .github
folders, into the public GCS bucket! A quick fix to the workflow path and a cleanup in GCS resolved that.
Phase 3: Leveling Up with a Load Balancer for HTTPS
Serving content over HTTP just wasn't an option; that padlock was essential. This meant the simple GCS static hosting setup needed an upgrade. Enter the Google Cloud HTTP(S) Load Balancer. This involved reserving a static IP, creating a Google-managed SSL certificate for both www.viable.dev
and viable.dev
, and configuring the Load Balancer itself. The backend was set up to point to our www.viable.dev
GCS bucket, with Cloud CDN enabled for better performance. The frontend was configured with the static IP and SSL certificate, along with a redirect from HTTP to HTTPS. This also meant another round of DNS updates at GoDaddy: changing the CNAME for www.viable.dev
to an A record pointing to the Load Balancer's IP, and creating a similar A record for the apex domain viable.dev
after removing any old records or forwarding rules. A bit of DNS troubleshooting was needed here to clean up multiple, conflicting A records for the apex domain.
Phase 4: The Final Bosses - XML Gremlins & Typos
With DNS propagating and the Load Balancer in place, the SSL certificate eventually provisioned successfully. However, the site then decided to greet me with an XML list of bucket contents instead of the glorious index.html
. It turned out that even with a Load Balancer, the GCS bucket's "Website configuration" (specifically, the main page suffix) is crucial. After a bit of a hunt in the GCP console UI, I set index.html
as the main page suffix. Victory? Not quite. Next up was a NoSuchKey
XML error. This usually means the system is looking for a specific file (like index.html
) and can't find it. After meticulously checking paths and configurations, a classic culprit was found: a typo involving an errant slash (/
) in a path reference. Fixing that tiny detail was the final key!
Outcome: Success!
And with that, viable.dev
(and www.viable.dev
) went live, serving content securely over HTTPS, with updates automatically deployed from GitHub. It was a multi-layered process with plenty of troubleshooting moments that served as great learning opportunities. It's incredibly satisfying to see it all come together!