All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Workers - Deploy Hooks are now available for Workers Builds

3mo ago

Source

CloudflareWorkers - Deploy Hooks are now available for Workers Buildscloudflare.com
Snippet from the RSS feed
Workers Builds now supports Deploy Hooks — trigger builds from your headless CMS, a Cron Trigger, a Slack bot, or any system that can send an HTTP request. Each Deploy Hook is a unique URL tied to a specific branch. Send it a POST and your Worker builds and deploys. curl -X POST " To create one, go to Workers & Pages > your Worker > Settings > Builds > Deploy Hooks . Since a Deploy Hook is a URL, you can also call it from another Worker. For example, a Worker with a Cron Trigger can rebuild your project on a schedule: 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 >; You can also use Deploy Hooks to rebuild when your CMS publishes new content or deploy from a Slack slash command . Built-in optimizations Automatic deduplication : If a Deploy Hook fires multiple times before the first build starts running, redundant builds are automatically skipped. This keeps your build queue clean when webhooks retry or CMS events arrive in bursts. Last triggered : The dashboard shows when each hook was last triggered. Build source : Your Worker's build history shows which Deploy Hook started each build by name. Deploy Hooks are rate limited to 10 builds per minute per Worker and 100 builds per minute per account. For all limits, see Limits & pricing . To get started, read the Deploy Hooks documentation .

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.