Skip to content
KB

KB Tech News

Tech journalism for India — bilingual

Codebase Review & Cleanup Summary

✅ Cleanup Completed

Files Removed (GitHub-specific)

Workflows & Actions:

GitHub-specific Files:

Empty Directories:

Files Kept (Essential)

N8N Workflow:

Documentation:

Jekyll Site:

🏗️ Updated Architecture

Old (with GitHub):

N8N → GitHub API → GitHub Actions → Jekyll Build → Azure Deploy

New (Direct):

N8N → Local File Creation → Jekyll Build → Azure Deploy

Benefits:

📝 N8N Workflow Changes

Nodes (Before):

  1. Schedule Trigger
  2. AI Content Generation
  3. Build Post File
  4. Git Operations ← REMOVED
  5. Jekyll Build
  6. Azure Deploy

Nodes (After):

  1. Schedule Trigger
  2. AI Content Generation
  3. Build Post File
  4. Save File Locally ← NEW
  5. Jekyll Build
  6. Azure Deploy

Key Changes:

🔧 Setup Requirements

Before (with GitHub):

After (no GitHub):

📦 Deployment Setup

N8N Docker Setup

docker run -d \
  --name n8n \
  -p 5678:5678 \
  -v ~/.n8n:/home/node/.n8n \
  -v /path/to/jekyll/site:/tmp/blog-site \
  -e TZ=Asia/Kolkata \
  docker.n8n.io/n8nio/n8n

Critical: Mount your Jekyll site to /tmp/blog-site

Environment Variables

Before:

GITHUB_TOKEN=ghp_...
AZURE_DEPLOYMENT_TOKEN=...
AZURE_APP_NAME=...
OPENAI_API_KEY=...

After:

AZURE_DEPLOYMENT_TOKEN=...
AZURE_APP_NAME=...
OPENAI_API_KEY=...

💡 File Management

Backup Strategy

Since files are no longer in GitHub, implement backups:

Option 1: Automated Backup (Cron)

# Add to crontab
0 2 * * * tar -czf /backups/blog-$(date +\%Y\%m\%d).tar.gz /tmp/blog-site

Option 2: N8N Backup Workflow Create separate N8N workflow:

Option 3: Volume Backup If using Docker volumes, backup the volume:

docker run --rm \
  -v blog-site:/source \
  -v /backups:/backup \
  alpine tar -czf /backup/blog-$(date +%Y%m%d).tar.gz -C /source .

📊 Cost Comparison

Component Before After
N8N (VPS) $5-10 $5-10
GitHub Actions Free (with limits) N/A
Git operations ~5-10s per post N/A
AI API $0-20 $0-20
Azure $0 $0
Total $5-30/month $5-30/month

Speed Improvement:

✅ Testing Checklist

📚 Documentation

Primary Guides:

  1. SETUP-GUIDE.md - Quick start guide
  2. QUICK-REFERENCE.md - One-page cheat sheet
  3. .github/N8N-INTEGRATION.md - Detailed N8N guide
  4. README-AUTONOMOUS-SETUP.md - Complete setup overview

Workflow File:

🚀 Quick Start

# 1. Copy Jekyll site
cp -r bhaskar-daily-ai-news /tmp/blog-site

# 2. Start N8N with mount
docker run -d --name n8n \
  -p 5678:5678 \
  -v ~/.n8n:/home/node/.n8n \
  -v /tmp/blog-site:/tmp/blog-site \
  docker.n8n.io/n8nio/n8n

# 3. Install deps in N8N
docker exec -it n8n sh -c \
  "apk add ruby ruby-dev build-base && \
   gem install jekyll bundler && \
   npm install -g @azure/static-web-apps-cli"

# 4. Import workflow in N8N UI
# 5. Configure env vars
# 6. Activate workflow
# 7. Done! 🎉

🎯 Summary

Removed: All GitHub dependencies Added: Direct file management in N8N Result: Simpler, faster, more autonomous system

The site is now fully self-contained in N8N with direct Azure deployment. No external version control needed.