mfinelli/Cloudflare Pages Deployments Cleanup
Deletes old Cloudflare Pages deployments with min/max retention, age threshold, and dry-run reporting.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| cloudflare_account_id | Cloudflare account ID | yes | — |
| cloudflare_api_token | Cloudflare API token with Pages Read+Edit permissions | yes | — |
| project | Cloudflare Pages project name | yes | — |
| environment | Which environments to clean (all|production|preview) | no | all |
| min-to-keep | Minimum number of deployments to always retain per environment | no | 5 |
| max-to-keep | Maximum number of recent deployments to retain per environment (≥ minToKeep) | no | 10 |
| only-older-than-days | Only delete deployments older than this many days | no | — |
| dry_run | If true, do not delete; only report | no | false |
| max-deletes-per-run | Safety cap on number of deletions per run | no | 50 |
| fail_on_error | If true, any deletion failure will fail the job | no | true |
| emit_report_artifact | If true, upload report.json as an artifact | no | true |
| emit_step_summary | If true, write a GitHub step summary | no | true |
Outputs
| name | description |
|---|---|
| consideredCount | Total deployments considered (after protections) |
| deletedCount | Number of deployments deleted this run |
| keptCount | Number of deployments kept this run |
| deletedIds | CSV of deleted deployment IDs |