Vercel Cloudflare migration + admin dashboard + AI news automation

Published: (March 13, 2026 at 05:27 PM EDT)
3 min read
Source: Dev.to

Source: Dev.to

Vercel → Cloudflare migration

Vercel’s cron requires the Pro plan. Needed twice‑daily AI news generation but couldn’t use cron on the free tier, so the site was moved to Cloudflare Pages and the cron jobs were separated into GitHub Actions.

Migration checklist

  • Change adapter to @astrojs/cloudflare in astro.config.mjs
  • Add wrangler.toml
  • Register environment variables in the Cloudflare dashboard
  • Disable preview builds (deploy main branch only)
  • Set up three GitHub Actions cron jobs
# .github/workflows/cron-ai-news.yml
on:
  schedule:
    - cron: '0 0,12 * * *'  # UTC 0,12 = KST 9 AM, 9 PM

Cloudflare Pages offers fast builds and a generous free tier, but SDKs that rely on Node.js built‑in modules (e.g., node:) won’t work.

AI news auto‑generation

Generates AI news automatically twice daily (KST 9 AM, 9 PM).

Source collection

Crawls five sources for AI‑related news:

  • Google Custom Search – “AI” keyword search
  • Hacker News/topstories API
  • Reddit – hot posts from /r/artificial, /r/MachineLearning
  • X (Twitter) – AI trending topics
  • GitHub Trending – today’s trending repositories

Post generation with Claude

Collected news is sent to Claude Haiku, which generates individual deep‑dive posts per topic. The workflow originally grouped posts by model (Claude, GPT, Gemini) but later switched to topic‑based individual posts.

The model was changed from Sonnet 4 to Haiku 4.5; generating 20+ posts daily raised cost concerns, though the quality difference was negligible.

Admin dashboard

Built an /admin page for at‑a‑glance site‑operations monitoring.

Tabs

  • Overview: visitor heatmap, stat cards, build logs by project, top engagement
  • Quick Actions: AI news generation, site rebuild, Dev.to sync
  • Content: full content list with type filters
  • Comments: comment management with delete

Visitor heatmap

A GitHub‑contributions‑style calendar heatmap that fetches the last 90 days from Upstash Redis. Includes month labels, day labels, and hover tooltips.

Dev.to cross‑posting

A GitHub Actions workflow automatically publishes new content to Dev.to.

How it works

  1. Detect changes in src/content/ subdirectories.
  2. Query the Dev.to API for existing articles (deduplication via canonical_url).
  3. Publish only new posts via POST /api/articles.
  4. Posts tagged with devto-migration are excluded (they originated from Dev.to).
  5. Rate limiting is handled with 3‑second intervals.

Gotcha: SDKs on Cloudflare Workers

Importing @anthropic-ai/sdk on Cloudflare Workers triggers node:events module errors because Workers run on V8 isolates, not Node.js.

Solution: Use fetch directly instead of the SDK.

Summary

  • Cloudflare Pages + GitHub Actions cron enables scheduling without a Vercel Pro plan.
  • AI news automation: 5‑source crawl → Claude Haiku post generation → twice‑daily publishing.
  • Admin dashboard: SSR API + client‑side rendering for quick setup.
  • Use fetch over SDKs on Cloudflare Workers; libraries with Node.js dependencies won’t work.

📌 Originally published at Jidong Lab

More AI news and dev logs → jidonglab.com

0 views
Back to Blog

Related posts

Read more »

Travigo

Travel as fast as you speak with Gemini! Where live agents meet immersive storytelling & 3D navigation. This project was created for entering the Gemini Live Ag...

Micro games

Hey Gamers! 👾 As part of the Rapid Games Prototyping module, we are tasked with reviewing a peer's game. The challenge is to analyse a prototype built in just...