pierskarsenbarg/Clean Cloudflare Pages Deployments
Deletes old Cloudflare Pages deployments based on count or age
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| api-token | Cloudflare API token. Falls back to CLOUDFLARE_API_TOKEN environment variable. | no | — |
| account-id | Cloudflare account ID. Falls back to CLOUDFLARE_ACCOUNT_ID environment variable. | no | — |
| project-name | Name of the Cloudflare Pages project. | yes | — |
| keep-deployments | Number of most recent deployments to keep. Cannot be used with keep-days. Exactly one of keep-deployments or keep-days must be set. | no | — |
| keep-days | Delete deployments older than this many days. Cannot be used with keep-deployments. Exactly one of keep-deployments or keep-days must be set. | no | — |
| environment | Which deployments to target: "preview", "production", or "all". Defaults to "preview". | no | preview |
| dry-run | If "true", log what would be deleted without actually deleting anything. | no | false |
Outputs
| name | description |
|---|---|
| deleted-count | Number of deployments deleted (0 in dry-run mode). |