This simple action calls the Akamai Api's to purge the cache of your website, which assists in clearing the cache after deploying a new application version.
All sensitive variables should be set as encrypted secrets in the action's configuration.
You need to declare a EDGERC
secret in your repository containing the following structure :
[ccu]
client_secret = your_client_secret
host = your_host
access_token = your_access_token
client_token = your_client_token
You can retrieve these from Akamai Control Center >> Identity Management >> API User.
Required Purge action you wish to run:
- invalidate : Invalidate all cache on the Akamai edge platform
- delete : Delete(remove) all cache from the Akamai edge platform
- Note: use caution when deleting all cache from the Akamai edge platform
Required Type of purge required:
- cpcode : Purge by cpcode
- tag : Purge by Cache Tag
- url : Purge by url
Required CPCode, Cache Tag or url's to purge
Place in a .yml
file such as this one in your .github/workflows
folder. Refer to the documentation on workflow YAML syntax here.
- name: Clear Cache
uses: jdmevo123/[email protected]
env:
EDGERC: ${{ secrets.EDGERC }}
with:
command: 'invalidate'
type: 'cpcode' #valid inputs are 'cpcode', 'url' and 'tag'
ref: '12345' #input url's as 'https://www.example.com/ https://www.example1.com/'
network: 'production'
This project is distributed under the MIT license.