Skip to content

mailergroup/purge-cf-cache-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action to Purge Cloudflare Cache 🗑️

Usage

All sensitive variables should be set as encrypted secrets in the action's configuration.

workflow.yml Example

Run using CloudFlare auth token

    - name: Purge cache
      uses: mailergroup/purge-cf-cache-action@v0.0.2
      with:
        cf_token: ${{ secrets.CF_TOKEN }}
        cf_zone_name: ${{ secrets.CF_ZONE_NAME }}

Purging specific files

To purge only specific files, you can pass an array of fully qualified URLs via a fourth environment variable named CF_PURGE_URLS.

cf_purge_urls: '["https://mailergroup.com/styles.css","https://mailergroup.com/app.js"]'

Purging by host

To purge only specific files, you can pass an array of fully qualified URLs via a fourth environment variable named CF_PURGE_URLS.

cf_purge_hosts: "https://mailergroup.com,https://foo.mailergroup.com"