OpenAICloudflare Developer PlatformApr 1, 2026, 12:00 AM

Workers - Deploy Hooks are now available for Workers Builds

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Workers - Deploy Hooks are now available for Workers Builds

Key Points

  • Trigger builds via simple POST
  • Automatic deduplication of redundant builds
  • Rate limits: 10/min per Worker, 100/min per account

Summary

Workers Builds now supports Deploy Hooks — unique POSTable URLs tied to a specific branch that trigger a build and deploy when called. Create hooks in the dashboard (Workers & Pages > your Worker > Settings > Builds > Deploy Hooks) and invoke them from any system that can send an HTTP POST (CMS webhooks, Cron Triggers, Slack commands, other Workers).

Key Points

  • Trigger builds with a simple POST to the hook URL, e.g. curl -X POST "https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/<DEPLOY_HOOK_ID>"
  • Each Deploy Hook is bound to a branch and visible in build history (shows which hook started each build) and dashboard (shows last triggered time).
  • You can call hooks from other Workers (example: a Worker with a Cron Trigger calling fetch(env.DEPLOY_HOOK_URL, { method: "POST" })).
  • Useful for CMS publish events, scheduled rebuilds, Slack slash commands, or any system that can POST a URL.
  • Built-in optimizations: automatic deduplication skips redundant builds if multiple triggers occur before the first build starts.
  • Rate limits: 10 builds per minute per Worker, 100 builds per minute per account; refer to Limits & pricing for full details.

Getting started

  1. Open Workers & Pages > your Worker > Settings > Builds > Deploy Hooks.
  2. Create a Deploy Hook for the target branch.
  3. Send a POST to the returned URL from your CMS, CI, Cron Worker, or any HTTP-capable system.

Read the Deploy Hooks documentation for implementation details and edge cases.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Workers — Deploy Hooks が Workers Builds で利用可能になりました

Deploy Hooks が Workers Builds で利用可能になりました

Workers Builds は Deploy Hooks をサポートするようになりました — headless CMS、Cron Trigger、Slack ボット、または HTTP リクエストを送信できる任意のシステムからビルドをトリガーできます。各 Deploy Hook は特定のブランチに紐づく一意の URL です。これに POST を送信すると、Worker のビルドとデプロイが実行されます。

例(CLI):

curl -X POST "https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/<DEPLOY_HOOK_ID>"

作成方法:

  • Cloudflare ダッシュボードで Workers & Pages > your Worker > Settings > Builds > Deploy Hooks に移動して Deploy Hook を作成します。
  • Deploy Hook は URL なので、別の Worker から呼び出すこともできます。例えば、Cron Trigger を持つ Worker で定期的にプロジェクトを再ビルドする例:

JavaScript

export default {
  async scheduled(event, env, ctx) {
    ctx.waitUntil(fetch(env.DEPLOY_HOOK_URL, { method: "POST" }));
  },
};

TypeScript

export default {
  async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext): Promise<void> {
    ctx.waitUntil(fetch(env.DEPLOY_HOOK_URL, { method: "POST" }));
  },
} satisfies ExportedHandler<Env>;

ユースケース:

  • CMS が新しいコンテンツを公開したときに再ビルドする。
  • Slack のスラッシュコマンドなど、外部トリガーからデプロイする。

組み込みの最適化:

  • 自動重複排除(Automatic deduplication): Deploy Hook が最初のビルド開始前に複数回発火した場合、冗長なビルドは自動的にスキップされます。これにより、webhook の再試行や CMS イベントのバースト到着時にビルドキューが整理されます。
  • 最終トリガー時刻(Last triggered): ダッシュボードで各フックが最後にトリガーされた時刻を表示します。
  • ビルドソース(Build source): Worker's のビルド履歴に、どの Deploy Hook(名前)でビルドが開始されたかが表示されます。

制限:

  • Deploy Hooks は Worker ごとに毎分 10 ビルド、アカウントごとに毎分 100 ビルドにレート制限されています。すべての制限については Limits & pricing を参照してください。

始めるには、Deploy Hooks documentation をお読みください。