{"id":16226367,"url":"https://github.com/ghostdevv/cloudflare-pages-cleanup","last_synced_at":"2025-04-03T01:40:41.273Z","repository":{"id":233075292,"uuid":"785952251","full_name":"ghostdevv/cloudflare-pages-cleanup","owner":"ghostdevv","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-13T02:07:44.000Z","size":61,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T15:46:41.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostdevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-13T01:56:49.000Z","updated_at":"2025-02-01T14:33:37.000Z","dependencies_parsed_at":"2024-04-19T04:46:30.181Z","dependency_job_id":null,"html_url":"https://github.com/ghostdevv/cloudflare-pages-cleanup","commit_stats":null,"previous_names":["ghostdevv/cloudflare-pages-cleanup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcloudflare-pages-cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcloudflare-pages-cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcloudflare-pages-cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcloudflare-pages-cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostdevv","download_url":"https://codeload.github.com/ghostdevv/cloudflare-pages-cleanup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922236,"owners_count":20855343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T12:48:53.699Z","updated_at":"2025-04-03T01:40:41.252Z","avatar_url":"https://github.com/ghostdevv.png","language":"TypeScript","readme":"# Cloudflare Pages Cleanup\n\nOld deployments in pages are not always a problem, but can be (for example) if your deployment URLs are public and you make a security fix. This script when ran will delete deployments older than two weeks.\n\n## Running\n\nYou'll need [Deno](https://docs.deno.com/runtime/manual) to run this script and to clone/download this repo.\n\nStep 1: Create a `.env` file, using the `.env.example` as an example.\n\n```bash\ncp .env.example .env\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eCLOUDFLARE_ACCOUNT_ID\u003c/summary\u003e\n\nYou can find your Cloudflare account id in the URL bar, it'll look something like this:\n\n![url bar showing cloudflare account id](./.github/account-id.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCLOUDFLARE_TOKEN\u003c/summary\u003e\n\nYou need to create an api token that has permissions on your pages project. You can create that on the [Cloudflare dashboard](https://dash.cloudflare.com/profile/api-tokens).\n\nSelect the \"Edit Cloudflare Workers template\"\n\n![cf dash api token](./.github/cf-api-token-template.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCLOUDFLARE_PAGES_PROJECT\u003c/summary\u003e\nThis is the name of your pages project which you set when you created it\n\u003c/details\u003e\n\nFinally you can run the script\n\n```bash\ndeno task run\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fcloudflare-pages-cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostdevv%2Fcloudflare-pages-cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fcloudflare-pages-cleanup/lists"}