Skip to content

Topic — Directus Flows x Cloudflare Pages automated deployment
Tools — Directus 11.x, Cloudflare Deploy Hook

Background

nuxt generate is static generation — data is baked into HTML at build time. After publishing a new article, the live site does not update automatically; a manual rebuild is required.

Solution: Directus Flow Triggering a Cloudflare Deploy Hook

Step 1: Create a Deploy Hook in Cloudflare Pages

  1. Cloudflare Dashboard → Pages → guess-what-frontend
  2. Settings → Build & deployments → Deploy hooks
  3. Add a hook, name it directus, set the branch to main
  4. Copy the generated Hook URL

Step 2: Create a Flow in Directus

  1. Settings → Flows → Add new
  2. Trigger: Event Hook
    • Scope: items.create, items.update, items.delete
    • Collections: posts
  3. Operation: Webhook / Request URL
    • Method: POST
    • URL: paste the Hook URL copied in Step 1
  4. Enable the Flow

Result

Every time an article is added or modified in Directus, the Flow automatically sends a POST request to Cloudflare, triggering a rebuild. The live site updates approximately 1–2 minutes later.