IT OPS
Cloudflare Pages preview purge for merged and deleted branches via GitHub
When a pull request is merged or its branch is deleted on GitHub, finds the matching Cloudflare Pages preview deployments for that branch, deletes them immediately.
How it runs
The automated pipeline, trigger to output.
- TriggerGitHub PR merged or branch deletedGitHub
- LogicExtract branch and confirm close/delete event
- ActionList and filter Pages previews for the branchCloudflare
- ActionDelete matched preview deploymentsCloudflare
- OutputLog cleanup event to AxiomAxiom
What it does
Preview deployments are useful while a branch is open and pure waste once it merges. This event-driven template listens for GitHub pull-request-closed and branch-delete events, matches the branch name to its Cloudflare Pages preview deployments, and purges them right away — no waiting for a nightly retention window. Each cleanup is recorded in Axiom so you can see how much storage merged-branch hygiene is saving.
When to use it
Use this on repos with heavy preview-deploy traffic where stale previews pile up the moment work merges. It complements a time-based sweeper by reclaiming branch previews at the exact moment they become dead.
How it works
- 1A GitHub webhook fires on PR merge or branch deletion.
- 2A logic step extracts the branch name and confirms the event is a close or delete.
- 3Cloudflare lists preview deployments and filters to that branch.
- 4Cloudflare deletes the matched preview deployments and reports freed bytes.
- 5Axiom logs the branch, deployment count, and reclaimed storage.
Set it up
What you configure once, before turning it on.
- 1Connect GitHubRepos, issues, pull requests, actions.
- 2Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
- 3Connect AxiomLog streams, queries, dashboards.
- 4Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 5Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 6Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More IT Ops workflows
Daily Building Anomaly Digest to MS Teams
Each morning queries BigQuery for the prior day's flagged sensor anomalies, summarizes them by site and system into a ranked briefing.
Indoor Air Quality Breach to Tenant Notice and Work Order
Listens for CO2, VOC, or humidity sensor alerts via webhook, and when a zone exceeds occupant-safety limits it emails affected tenants, opens a Monday remediation task.
Self-Service Reclaim Email for Idle Users
Detects users idle in a SaaS app past the threshold and emails each one a keep-or-release link; unanswered seats after the deadline are auto-flagged for removal.
Outlook Room Conflict Resolver with Approval Gate in Teams
When an Outlook room clashes, proposes a rebooking and asks the bumped meeting's organizer to approve the move in Microsoft Teams before any change is made.
Outlook Room Double-Booking Resolver with Auto-Rebook
Detects when two meetings claim the same Outlook room resource and automatically relocates the lower-priority meeting to a comparable free room.
Monthly Wasted-License Cost Report
Aggregates inactive-seat data across all tracked SaaS apps each month, computes total reclaimable spend, and delivers a ranked cost report to leadership in Notion and Slack.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
