@plugdash/autobuild
Pure infrastructure
Publish in the admin. Live in 60 seconds.
Fires your Cloudflare Pages, Netlify, or Vercel build hook on every publish. No git push. No manual redeploy. The admin becomes the thing that moves the site.
import autobuild from "@plugdash/autobuild"
// in emdash plugins array:
autobuild({
hookUrl: import.meta.env.CF_PAGES_DEPLOY_HOOK,
allowedHosts: ["api.cloudflare.com"],
}) publish in admin -> hook fires -> deploy kicks off -> live
No UI. Pure infrastructure.
Setup
-
Install and register
npm install @plugdash/autobuildimport autobuild from "@plugdash/autobuild" // in emdash plugins array: autobuild({ hookUrl: import.meta.env.CF_PAGES_DEPLOY_HOOK, allowedHosts: ["api.cloudflare.com"], })
Get your build hook URL from Cloudflare Pages, Netlify, or Vercel. Paste it as an env var. After this, every publish rebuilds the site. Debounces 5 seconds so a batch of publishes triggers one deploy, not ten.
It looks right. But it's yours to change.
AutobuildConfig
| option | type | default | description |
|---|---|---|---|
method | "POST" | "GET" | "POST" | HTTP method for the hook |
collections | string[] | Which collections trigger rebuilds | |
statuses | string[] | ["published"] | Trigger only on these statuses |
debounceMs | number | 5000 | Debounce window for rapid publishes |
body | string | object | Optional request body | |
headers | object | Optional extra headers |
Pairs well with
these write metadata on publish. autobuild makes sure the live site sees the new metadata within a minute.