From 42a7569236082e6eb9b2b5f6dfd4495ecc2ed999 Mon Sep 17 00:00:00 2001 From: Azalea Gui <22280294+hykilpikonna@users.noreply.github.com> Date: Thu, 2 Jan 2025 07:06:29 -0500 Subject: [PATCH] [+] Cloudflare cleanup action --- .github/workflows/cloudflare-clean.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/cloudflare-clean.yml diff --git a/.github/workflows/cloudflare-clean.yml b/.github/workflows/cloudflare-clean.yml new file mode 100644 index 00000000..aaa003d2 --- /dev/null +++ b/.github/workflows/cloudflare-clean.yml @@ -0,0 +1,34 @@ +name: Cloudflare Cleanup + +on: + schedule: + - cron: '0 0 * * 0' # Runs every week on Sunday at 00:00 UTC + workflow_dispatch: # Allows manual triggering of the workflow + +jobs: + clean: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'yarn' + - run: yarn install + + - name: Clean Cloudflare Deployments (one-among-us) + run: yarn cloudflare_clean + with: + env: + CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CF_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CF_PAGES_PROJECT_NAME: one-among-us + + - name: Clean Cloudflare Deployments (our-data) + run: yarn cloudflare_clean + with: + env: + CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CF_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CF_PAGES_PROJECT_NAME: our-data