We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 96cac9b + 57f7023 commit 3412b7bCopy full SHA for 3412b7b
1 file changed
.circleci/config.yml
@@ -29,6 +29,22 @@ jobs:
29
name: Deploy website and api-data to the correct environment (production/staging)
30
command: sh scripts/deploy.sh
31
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
+
48
workflows:
49
version: 2
50
commit:
@@ -42,3 +58,10 @@ workflows:
58
only:
59
- master
60
- staging
61
+ - purge_cache:
62
+ requires:
63
+ - deploy
64
+ filters:
65
+ branches:
66
+ only:
67
+ - master
0 commit comments