Codebase Review & Cleanup Summary
✅ Cleanup Completed
Files Removed (GitHub-specific)
Workflows & Actions:
- ❌
.github/workflows/azure-static-web-apps.yml.disabled - ❌
.github/workflows/n8n-create-post.yml.disabled - ❌
.github/workflows/pages_deploy.yml.disabled - ❌
.github/workflows/auto_post.yml.disabled - ❌
.github/workflows/issue-to-post.yml - ❌
.github/workflows/subscribe-intake.yml - ❌
.github/workflows/README.md - ❌
.github/workflows/AZURE-DEPLOYMENT-GUIDE.md
GitHub-specific Files:
- ❌
.github/ISSUE_TEMPLATE/new_post.yml - ❌
.github/ISSUE_TEMPLATE/subscribe.yml - ❌
.github/SECRET_VERIFICATION.md - ❌
CNAME(GitHub Pages custom domain) - ❌
_headers(Netlify/GitHub Pages headers) - ❌
AUTOMATION-GEMINI.md(old automation doc)
Empty Directories:
- ❌
.github/workflows/ - ❌
.github/ISSUE_TEMPLATE/
Files Kept (Essential)
N8N Workflow:
- ✅
.github/n8n-workflow-direct-azure.json- Importable N8N workflow (updated, no Git operations) - ✅
.github/N8N-INTEGRATION.md- Complete integration guide (updated, no GitHub refs)
Documentation:
- ✅
README.md- Main project README - ✅
README-AUTONOMOUS-SETUP.md- Autonomous setup guide (updated) - ✅
SETUP-GUIDE.md- NEW Quick setup guide - ✅
QUICK-REFERENCE.md- One-page cheat sheet (updated)
Jekyll Site:
- ✅
_config.yml- Jekyll configuration - ✅
_posts/- Blog posts - ✅
_authors/- Author profiles - ✅
_layouts/- Page templates - ✅
_includes/- Reusable components - ✅
_data/- Data files - ✅
assets/- CSS, images - ✅
pages/- Static pages - ✅
Gemfile- Ruby dependencies - ✅
index.html- Homepage - ✅
robots.txt- SEO - ✅
news-sitemap.xml- Google News sitemap - ✅
staticwebapp.config.json- Azure configuration
🏗️ 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:
- ⚡ Faster (no GitHub API calls)
- 💰 Cheaper (no GitHub Actions minutes)
- 🎯 Simpler (fewer moving parts)
- 🔒 More control (everything in N8N)
📝 N8N Workflow Changes
Nodes (Before):
- Schedule Trigger
- AI Content Generation
- Build Post File
- Git Operations ← REMOVED
- Jekyll Build
- Azure Deploy
Nodes (After):
- Schedule Trigger
- AI Content Generation
- Build Post File
- Save File Locally ← NEW
- Jekyll Build
- Azure Deploy
Key Changes:
- ❌ Removed Git clone/commit/push operations
- ❌ Removed GITHUB_TOKEN requirement
- ✅ Files saved directly to
/tmp/blog-site/_posts/ - ✅ Jekyll site must be mounted/copied to
/tmp/blog-site
🔧 Setup Requirements
Before (with GitHub):
- GitHub Personal Access Token
- GitHub repository
- Azure deployment token
- AI API key
- N8N
- Ruby/Jekyll
- Git
- Azure CLI
After (no GitHub):
GitHub Personal Access TokenGitHub repositoryGit- ✅ Azure deployment token
- ✅ AI API key
- ✅ N8N
- ✅ Ruby/Jekyll
- ✅ Azure CLI
- ✅ Jekyll site mounted at /tmp/blog-site
📦 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:
- Schedule: Daily at 2 AM
- Action: Zip
/tmp/blog-site - Upload: To cloud storage (S3, Dropbox, etc.)
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:
- Before: 2-3 minutes (includes Git operations)
- After: 1.5-2 minutes (direct file save)
✅ Testing Checklist
- N8N container running with mounted volume
- Jekyll site accessible at
/tmp/blog-site bundle installsuccessful- Azure deployment token configured
- AI API key configured
- N8N workflow imported
- Manual workflow execution successful
- Post file created in
_posts/ - Jekyll build completes
- Azure deployment successful
- Site accessible at https://kbhaskar.tech
- News sitemap updates
- Automated schedule activated
📚 Documentation
Primary Guides:
- SETUP-GUIDE.md - Quick start guide
- QUICK-REFERENCE.md - One-page cheat sheet
- .github/N8N-INTEGRATION.md - Detailed N8N guide
- README-AUTONOMOUS-SETUP.md - Complete setup overview
Workflow File:
- .github/n8n-workflow-direct-azure.json - Import this into N8N
🚀 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.