Sid Lacy
/ Now Posts

Building This Site

784 words

TL;DR: I used Hugo, GitHub Actions, and Obsidian to automate publishing content on this site.


In 2025, I want to write more. Even if what I publish gets no visibility, taking the time to organize my thoughts enough to share forces me to more deeply understand what Iā€™m thinking about. I maintained a blog in college (at this same domain) and I had a lot of fun exploring personal projects, then discussing the parts I found most interesting. But, it’s been a while, and I wanted to start over.

Problem: How can I share my writing without a place to publish it? Solution: Use Substack, which already has an awesome community; or Medium, which has great SEO; or Bear Blog, which is super simple.

Problem #2: I use Obsidian for writing and note-taking already, and it would be inconvenient to juggle multiple tools. Solution #2: Use Obsidian Publish.

Obsidian Publish looks great, but it costs nearly $100 USD per year. Since this site is just for fun ā€” and I enjoy tinkering ā€” I wondered if I could create similar basic functionality for free (that is, just some mechanism to make my private words public).

Functional requirements:

  1. I shouldn’t have to leave Obsidian to create, edit, or remove content (text and assets), and I should be able to do this on desktop and mobile.
  2. I shouldn’t have to locally install or manage other programs to work in tandem with Obsidian (but Obsidian plugins are okay).
  3. I shouldn’t have to tinker with hosting infrastructure after the initial configuration (goal: set it and forget it).
  4. Content deployment should be fast.
  5. There must be version control.
  6. It must be free, either by using open source software or staying within service free tiers.

Here’s the tech stack I landed on:

  1. Content editor: Obsidian (mandatory) with the obsidian-git plugin. Obsidian is free for non-commercial use.
  2. Site generator and styling: Hugo and TailwindCSS, because I am most familiar with these and they’re very simple to set up. Both Hugo and TailwindCSS are free.
  3. Site hosting: Firebase, since I already use Google Workspace. As of publication, Firebase is free on the Spark Plan for hosting up to 10 GB of content with 360 MB of transfer per day. I don’t expect to get anywhere close to those limits.
  4. Version control and deployment automation (CD): GitHub and GitHub Actions. GitHub repositories are free, and as of publication, GitHub Actions on public repositories are free for up to 500 MB of storage and 2,000 compute minutes per month. Deployments of this site are measured in seconds and do not persistently store artifacts.

(Sidenote: this is not the “best” solution. Firebase could be replaced with Netlify, Hugo with Jekyll, or the whole process with something fundamentally different. I just used the technologies familiar to me so I could iterate quickly and have fun.)

Here’s a rough sketch of how all the moving parts interplay:

Site content deployment process flow
Site content deployment process flow

Deployment flow:

  1. I use obsidian-git to commit site content changes to the swlacy/swlacycom-content repository.
  2. When a change is made on the main branch of swlacy/swlacycom-content, the trigger-deployment.yml GitHub Actions workflow is executed.
  3. This workflow uses a GitHub Personal Access Token (PAT) to subsequently trigger the deploy.yml GitHub Actions workflow in the swlacy/swlacycom repository, which holds the site structure and configuration.
  4. The secondary workflow installs dependencies, combines the head of both repositories, builds the site, then uses a Firebase token to push the build artifacts to Firebase. Committing a test change on one file takes under a minute from the initial git push to public visibility on the site.

I used a two-repo approach instead of a simple monorepo to minimize clutter in my Obsidian vault. A monorepo would have brought all the site configuration files and structure along with the content.

The end result satisfies the requirements: I have a directory in my Obsidian vault which holds just the text and assets of this site, and the human process of committing changes only takes a few seconds. It costs $0, GitHub manages version control, and I can write and publish entirely within Obsidian.

As I am only modifying a few files at a time, this approach should scale well into the future. I could incur charges from exceeding the Firebase free tier if this site gets too much traffic ā€“ but I think that would be a happy problem!

This post was published using the described workflow.


Resources:

  1. Set up Firebase with GitHub Actions: https://firebase.google.com/docs/hosting/github-integration#set-up.
  2. How to set up obsidian-git: https://publish.obsidian.md/git-doc/Installation.
  3. GitHub Action to trigger another GitHub Action in a different repo: https://github.com/swlacy/swlacycom-content/blob/main/.github/workflows/trigger-deploy.yml.
  4. How to use Hugo mounts, which allow separating site content into a different repo without using git submodules: https://gohugo.io/hugo-modules/configuration. Example configuration: https://github.com/swlacy/swlacycom/blob/main/config/production/hugo.yml.