My blog workflow
One of the prerequisites for me setting up this website was that I needed to be able to add new posts with as little friction as possible.
It did require a bit of setup (a few hours of work), but I am finally happy with how it has turned out.
The workflow is as follows:
- The posts for this blog are version controlled on Github in its own repository as markdown files.
- The application that powers it is in another repository. It is only responsible for parsing these markdown files and displaying it.
- Whenever I write a new post, I commit and push it into the repository which triggers a Github action on the main application's repository for a new deployment, through webhooks.
- As part of the deployment step, the posts repository is checked out and the application is containerized and deployed through Fly.io.
Keeping the posts in its own repository has a few advantages: simplicity, portability and, of course, it's always nice to have them version controlled.