Travis: purge CloudFlare cache after deployment (#63)
This commit is contained in:
parent
8bec7952ef
commit
e32fc80fc5
11
.travis.yml
11
.travis.yml
|
@ -6,6 +6,10 @@ env:
|
|||
global:
|
||||
- BUILD_WEB=/tmp/build-web
|
||||
- secure: dMquVRuM4Wi/N3oZJaNIWSW5mpehxVuzDiDnC51OwfMtdNfdyWV7qKJQY44MjbveuyQd7eA/AuTLE+loaAFxiRfBXl2yI5NkAOrJwbbDyw/lAN9Og2FmNi+QLaTsNhpbYZ4zaUNEEqRWs9gIajGaXcWdO/HNYiKHHrk7+XXNDeM=
|
||||
# CLOUDFLARE_AUTH_EMAIL/CLOUDFLARE_AUTH_KEY
|
||||
- secure: JYKSA0crhIfgE7l51aF+qYr4JERLU3hXWRzKSmwuBi4uZzNxWfAm1hQ8qJ4+TTIIjJpr4dceVLdXRZDvX5B83hP8W4m4eoRp98IqwLinS5plB86Kv/C53vYGaMIaE+3u0EdehRgpSIN+2qmAUTNoQkFZsZh1Ok4vaN3QZaE2+f8=
|
||||
# CLOUDFLARE_ZONE
|
||||
- secure: LYV3F3ink6p8XfR2rjCcYDfTDSK22QRU4kYK4e77t42e3zky/tbiNZcJsrq9J5FwNEBZXDLxuXsgeEza3+x6N0uxjBIdopuEullL5jf5WRISxUja2wplOgCa8RC8CIvWyZOsbtw8UWJvbCyjwUXPT8q9sUT1U+KhYSuqVMo32GI=
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
@ -88,4 +92,11 @@ after_success:
|
|||
git commit -m "Update from Travis for awesome-www@${commit_hash}"
|
||||
git --no-pager show --stat
|
||||
git push origin "$(git symbolic-ref --quiet HEAD)" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
|
||||
|
||||
# Purge CloudFlare cache.
|
||||
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE/purge_cache" \
|
||||
-H "X-Auth-Email: $CLOUDFLARE_AUTH_EMAIL" \
|
||||
-H "X-Auth-Key: $CLOUDFLARE_AUTH_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '{"purge_everything":true}'
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue