27 Oct 2025
Every successful blog needs consistent content, but maintaining that consistency manually is exhausting. That's why we built an automated blog content generation system that creates draft posts on a schedule, leverages AI for content ideas, and integrates seamlessly with our development workflow.
Creating high-quality blog content is time-consuming:
We wanted to automate the heavy lifting while keeping human creativity at the core.
We built a complete automation system that:
CSV Queue → GitHub Action → AI Processing → MDX Generation → PR → Vercel Preview → Review → Publish
Our automation starts with a scheduled GitHub Actions workflow that runs every weekday:
name: Auto Draft Post
on:
workflow_dispatch: # Manual trigger
schedule:
- cron: '0 6 * * 1-5' # Monday-Friday at 6 AM UTC
permissions:
contents: write
pull-requests: write
jobs:
draft:
runs-on: ubuntu-latest
steps:
- name: Generate draft post
id: gen
run: node scripts/generate-post.cjs
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: draft/${{ github.run_id }}
title: "📝 Draft: ${{ steps.gen.outputs.slug }}"
labels: draft
Why it's awesome:
Our script reads from a CSV queue and generates valid MDX files:
// scripts/generate-post.cjs
const fs = require('fs');
const path = require('path');
function main() {
const now = new Date();
const slug = slugify(`auto-draft-${timestamp}`);
// Generate frontmatter with all required fields
const frontmatter = {
title: 'Auto Draft...',
description: 'Auto-generated draft...',
slug: slug,
date: now.toISOString(),
lang: 'en',
tags: ['pipeline', 'draft'],
draft: true,
// ... all required fields
};
// Write MDX file
fs.writeFileSync(path, mdxContent);
}
Smart features:
We implemented Next.js Draft Mode to safely preview content:
// src/app/api/admin/enable-draft/route.ts
export async function GET(req: Request) {
// Basic Auth validation
const auth = req.headers.get('authorization');
const [u, p] = Buffer.from(auth.split(' ')[1], 'base64')
.toString().split(':');
if (u !== user || p !== pass) {
return unauthorized();
}
// Enable draft mode
const draft = await draftMode();
draft.enable();
return NextResponse.json({ ok: true });
}
Why it matters:
Our CSV-based queue system:
title,description,lang,tags,author
"How We Built Our MVP in 6 Weeks","A detailed case study...","en","startup,mvp,case-study","Anna Hartung"
"Wie wir unser MVP gebaut haben","Ein detaillierter Fallstudienbericht...","de","startup,mvp,fallstudie","Anna Hartung"
The script automatically:
Future enhancements:
Every PR automatically creates a Vercel Preview:
Next.js 15
Contentlayer2
GitHub Actions
Vercel
Since implementing this system, we've:
// Future: AI-powered content generation
async function generateWithAI(topic) {
const response = await openai.chat.completions.create({
model: "gpt-4",
messages: [
{ role: "system", content: "You are a technical blog writer..." },
{ role: "user", content: `Write about: ${topic.title}` }
]
});
return response.choices[0].message.content;
}
Automating blog content creation isn't about replacing humans—it's about amplifying human creativity. By automating the routine tasks (file creation, deployment, preview), we free up time for what matters: creating compelling content that resonates with readers.
Our system proves that with the right tools (Next.js, GitHub Actions, Vercel) and smart automation, you can build a content pipeline that's both powerful and maintainable.
Want to see this in action? Reach out to discuss how we can help you automate your content workflow.
Next up: We'll dive deeper into how we integrated AI for content generation and the challenges we faced along the way.
Enter your email to receive our latest newsletter.
Don't worry, we don't spam
H-Studio Bot
H-Studio Bot
Anna Hartung
Discover how we built this high-performance blog using Next.js 15, Contentlayer2, AI-powered content generation, and modern engineering practices. Learn about our architecture and why it matters.
Learn how systematic approaches to diagnosing bottlenecks and resolving them with lightweight engineering practices can dramatically increase output without increasing headcount.
Learn how high-traffic websites engineer performance deliberately: predictable rendering, efficient data delivery, and architecture that holds up at scale.
Discover the technical architecture behind H-Studio's website - built with Next.js 15, TypeScript, and cutting-edge web technologies. Learn how we structure 20+ service pages, implement GDPR compliance, and optimize for performance.
Explore our case studies demonstrating these technologies and approaches in real projects

Building an intelligent platform that connects AI models with real-world applications.
Learn more →
Revolutionizing textile industry with IoT sensors and data analytics.
Learn more →
Real-Time Data Streaming Platform — High-performance data-streaming platform capable of processing millions of financial messages per second.
Learn more →