Automating My Astro Blog with GitHub Actions
Building a static site does not mean you have to give up modern CMS features like scheduled publishing.
By decoupling my content repository from my portfolio presentation, I created a highly flexible system:
- GitHub Actions handles the daily cron schedule to check for due posts.
- A lightweight Node script manages the publication state without modifying my actual writing.
- Netlify automatically fetches the private repository and deploys the updated content.
The Magic of Content Loaders
Astro’s Content Loader API made it trivial to pull markdown files from outside the standard source directory. This means my code and my writing can live in entirely different repositories, keeping my workspace clean and focused.
I am excited to keep writing and tweaking this setup!