GitHub Service allow automatic MaxCDN cache purging on code updates. Here’s a brief overview of how to setup this service.

Before You Start

  1. Before getting started you’ll need the following information at hand.
  2. Your “Company Alias”, “Consumer Key” and “Consumer Secret”, obtained from your MaxCDN Account API Page.
  3. Your “Zone ID”, obtained from your MaxCDN Account Pull Zones Overview page.
  4. GitHub’s “hook” IP range, obtained by checking the “hook” key at GitHub’s “meta” API endpoint.

Adding the Hook

  1. Setup of the MaxCDN GitHub Service is pretty straight forward. Added the MaxCDN service, by choosing “Settings > Webhooks & Services” in your GitHub project.

  2. This will take you to a setup page, where you’ll need to enter the MaxCDN account information you’ve collected.

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

  4. For more information on whitelisting IP with MaxCDN, see our support page on How To Whitelsit Your Server IP To Use The API.
  5. Done.
  6. With that done, your cache’s will be purged whenever you push a change to your GitHub repo.