evolution / wordpress

Rapidly create, develop, & deploy WordPress across multiple environments.
MIT License
200 stars 18 forks source link

KeyCDN Purge on Deploy #157

Closed jasoncomes closed 7 years ago

jasoncomes commented 7 years ago

Deployment Task (depoy.rb: KeyCDN Purge Function)

after :finished, :clear_cdn do
    run_locally do
      execute "curl 'https://api.keycdn.com/zones/purge/43808.json' -u sanitized_username_or_api_token:"
    end
  end

Test 1:

Updated file: http://affordablecolleges-5876.kxcdn.com/wp-content/themes/accom-theme/assets/dist/style.min.css

1. Highcharts: $ bundle exec cap staging deploy

screenshot 2017-01-04 13 21 41

2. Highcharts merged into Master: $ bundle exec cap production deploy

screenshot 2017-01-04 13 26 30

3. Master: $ bundle exec cap production evolve:up

screenshot 2017-01-04 13 30 19

4. KeyCDN: Manul Purge by URL - http://affordablecolleges-5876.kxcdn.com/wp-content/themes/accom-theme/assets/dist/style.min.css

screenshot 2017-01-04 13 40 45

5. KeyCDN: Manual Purge of Zone

screenshot 2017-01-04 13 40 45

6. Master: $ bundle exec cap production evolve:restart

screenshot 2017-01-04 13 44 37

EvanK commented 7 years ago

@jasoncomes As this is a public repo, I've sanitized the keycdn api token from the issue above