Skip to content

Purge cache of Cloudflare CDN #541

Purge cache of Cloudflare CDN

Purge cache of Cloudflare CDN #541

Workflow file for this run

name: "Purge cache of Cloudflare CDN"
on:
check_run:
types:
- completed
jobs:
trigger:
if: ${{ github.event.check_run.name == 'Cloudflare Pages' && github.event.check_run.conclusion == 'success' && github.event.check_run.head_sha == github.sha && github.ref == 'refs/heads/main' && github.repository_owner == 'xicri' }}
timeout-minutes: 3
runs-on: ubuntu-latest
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Purge cache of Cloudflare CDN
run: |
npm install esno undici
npm run purge-cache