New Publishing Workflow
This site now has a new publishing workflow. Hopefully this will reduce friction and encourage me to write more.
I have a Jekyll based builder with site contents in a private github repo. I use Obsidian to edit it, because Obsidian.
When I’m happy with a page, I push it to my private repo. I have an action set up that will then build the site with the following docker file:
FROM ruby:3.3 as builder
WORKDIR /site
ADD Gemfile Gemfile.lock ./
RUN bundle install
and then I publish it using Github Pages, using this workflow:
name: Makefile CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Site
run: make
- name: Push directory to another repository
uses: cpina/github-action-push-to-another-repository@v1.7.2
env:
SSH_DEPLOY_KEY: $
with:
user-email: 'dewey@deweysasser.com'
destination-repository-name: 'deweysasser.github.io'
destination-github-username: 'deweysasser'
source-directory: '_site'
target-branch: 'main'
Obviously, I have a Makefile
to stitch this all together, but that only does a docker build
, then a docker run
with the current path mapped into the container, so it can produce the site output. I could do that in straight up ruby on GitHub Actions, but I want the same build process locally as in GHA, and this keeps it nice and consistent.
Once the generated site is committed to the public site repo, I use the default Action to publish a static site.
Potential improvements
- use the Obsidian Enveloppe plugin to allow me to use all of the rich set of Obsidian rendering in my blog.
- use the Obsidian Git Plugin to automate the commits
These two approaches are likely in conflict, so I probably won’t do both. I’ll likely go with the latter choice until I need something like Dataview (which is utterly awesome for doing things in Obsidian).
- deploy the site directly from my private repo
- make my private repo the public one
I’m currently on a free GitHub plan, so I can’t have pages associated with a private site, but…there’s really nothing private in my public site (though I should scrutinize that before committing to it), so I will quite probably at some point make the source public, and not just the site.