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
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