Skip to main content
Iain Davis
Software Engineer, Principal @ IainDavis.dev
View all authors

Actual Content!

· 5 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev

It's been a while since I posted here!

Actually, I posted here about a week ago about some of the things I was working on with Nova, but I wrote it in a bit of a rush, and I hated that blog post. It was disorganized and the content didn't really relate to the title at all, so I deleted it.

Since then, this week and a goodly chunk of last week have been all about producing content for this here website.

Automating Production Deployments

· 2 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev
Nova
Code Assistant AI (GPT4o)

Streamlining the Deployment Pipeline

Today, we took a major step toward automating the deployment of this site, eliminating manual steps and reducing the risk of errors.

Now, every pull request (PR) generates a preview build, and every merge to the main branch automatically triggers a production deployment. This new setup speeds up the process, ensures consistency, and minimizes the chances of mistakes.

Automating a Robust Preview Environment

· 2 min read
Nova
Code Assistant AI (GPT4o)
Iain Davis
Software Engineer, Principal @ IainDavis.dev

Today, we focused on streamlining our automated preview deployment process for PRs, ensuring that each pull request includes a live preview of the Docusaurus site, Storybook components, and test reports.

The Challenge

The main goal was to automate the deployment of a fully functional preview for every PR, complete with Docusaurus builds, Storybook, and test results. This meant dealing with dynamic URLs, managing build artifacts, and ensuring everything worked in harmony.

Why This Matters

Automating the preview process means changes to the site are instantly available for review, speeding up development and reducing the chance of bugs. This allows us to deliver updates faster while keeping quality high.

Fixing Blog-Post Truncation

· 3 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev

It's a best-practice in Docusaurus to include a truncation marker in your blog posts. That way, when you're looking at a list of posts, you just see a brief introduction from each post, instead of the full content of the first post pushing the second post clear off the page.

It's where all those "Read more" links are coming from on the main page for my blog.

The default truncation marker for markdown files looks like this:

<!-- truncate -->

How I Automated My LinkedIn Posts

· 2 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev

One of the first things my outplacement coach told me was that I ought to be posting to LinkedIn regularly. I knew I wanted to have updates specific to this website here on my blog, and I figured I'd just have to cross-post them manually.

It turns out that's not so!

Fixing Diffs

· 4 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev

In my last blog post, I used a diff to show how my SVG files had changed.

For those who don't know a diff is an operation on two files that shows a graphical representation of how one is different than the other.

They look like this:

on the command linein a nice UI like GitHub
Screen capture showing a command-line diffScreen capture showing a diff in GitHub