MaxCDN Blog

Updates & Insights on all Things CDN

Purge your MaxCDN Cache with GitHub Services

MaxCDN GitHub Services

MaxCDN has recently added a GitHub Service allowing for automatic cache purging on code updates. Here’s a brief overview of how to setup this service.

Before You Start


Before getting started you’ll need the following information at hand.

  1. Your “Company Alias”, “Consumer Key” and “Consumer Secret”, obtained from your MaxCDN Account API Page.

  2. Your “Zone ID”, obtained from your MaxCDN Account Pull Zones Overview page.

  3. GitHub’s “hook” IP range, obtained by checking the “hook” key at GitHub’s “meta” API endpoint.

Adding the Hook


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

github-services1

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

github-services2

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.

github-services3

For more information on whitelisting IP with MaxCDN, see MaxCDN’s support page on How To Whitelsit Your Server IP To Use The API.

Done.


With that done, your cache’s will be purged whenever you push a change to your GitHub repo.

  • harishchouhan

    Hope something similar is added for BitBucket too.

    • http://blog.justindorfman.com jdorfman

      Good point. Thanks

  • http://www.MaxCDN.com/ Chris Ueland / MaxCDN

    Does BitBucket have something similar?

Categories

Brand New MaxCDN Tools

Compare the first and last byte speed of 2 websites in 5 seconds and more:

Start Testing