File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 2929 name : Deploy website and api-data to the correct environment (production/staging)
3030 command : sh scripts/deploy.sh
3131
32+ purge_cache :
33+ executor : node
34+ steps :
35+ - run :
36+ name : Purge Cloudflare cache
37+ command : |
38+ sleep 10
39+ curl https://api.cloudflare.com/client/v4/zones/1b447807502a801bdff3f71052fab25b/purge_cache \
40+ -H 'Content-Type: application/json' \
41+ -H "Authorization: Bearer $CF_POKEAPI_CIRCLECI_CACHE_PURGE_NARAMSIM" \
42+ -d '{
43+ "files": [
44+ "https://pokeapi.co/"
45+ ]
46+ }'
47+
3248workflows :
3349 version : 2
3450 commit :
@@ -42,3 +58,10 @@ workflows:
4258 only :
4359 - master
4460 - staging
61+ - purge_cache :
62+ requires :
63+ - deploy
64+ filters :
65+ branches :
66+ only :
67+ - master
You can’t perform that action at this time.
0 commit comments