GitHub Service allows automatic MaxCDN cache purging on code updates. This article will provide a brief overview of how to set up this service.
Before You Start
Before getting started you’ll need the following information at hand:
- Your Company Alias, Consumer Key and Consumer Secret, obtained from your MaxCDN Account API Page.
- Your Zone ID, obtained from your MaxCDN Account Pull Zones Overview page.
hookIP range, obtained by checking the
hookkey at GitHub’s “meta” API endpoint.
Adding the Hook
Setup of the MaxCDN GitHub Service is pretty straight forward. Add the MaxCDN service, by choosing Settings > Webhooks & Services in your GitHub project.
This will take you to a setup page, where you’ll need to enter the MaxCDN account information you’ve collected.
To allow GitHub to be able to purge your cache, you’ll need to whitelist their IP block. Because this is a block and not a single IP, you’ll want to use a wild card for the last set of numbers – e.g. “22.22.22.%” – allowing all IPs in the range access.
For more information on whitelisting IP with MaxCDN, see our support page on How To Whitelist Your Server IP To Use The API.
With that done, your caches will be purged whenever you push a change to your GitHub repo.
If you have any questions or experience any issues, please reach out to the support team, live chat and ticket support are available 24/7.