Skip to content

johncburnette/stackpath-cdn-purge

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

stackpath-cdn-purge

Heavily inspired by GrandPoohBears stackpath cdn purge, I needed a way to be able to pass a list of files to purge from Stackpath. Since purging the entire directory was not an option for my use case, I decided to make this so that you could pass an array of URLs to the action to purge them. A URL to a list of domains can also be passed to this action for cases where multiple stacks need to be purged

Usage

name: Purge CDN
uses: johncburnette/stackpath-cdn-purge@v1
with:
  clientId: ${{ secrets.STACKPATH_CLIENT_ID }}
  clientSecret: ${{ secrets.STACKPATH_CLIENT_SECRET }}
  stackId: stack-id-here
  purgeType: list
  branch: ${{ github.ref_name }}
  urls: |
    https://www.example.com/file.js
    https://www.example.come/file2.js
name: Purge CDN
uses: johncburnette/stackpath-cdn-purge@v1
with:
  clientId: ${{ secrets.STACKPATH_CLIENT_ID }}
  clientSecret: ${{ secrets.STACKPATH_CLIENT_SECRET }}
  stackId: stack-id-here
  purgeType: fetch
  branch: ${{ github.ref_name }}
  urls: https://www.example.com/domains.json

About

Github action for purging URLs in the Stackpath CDN

Resources

License

Stars

Watchers

Forks

Packages

No packages published