-
Notifications
You must be signed in to change notification settings - Fork 4
26 lines (25 loc) · 980 Bytes
/
cf-pages-await.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Clear Site Cache
on: push
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v2
- name: Wait for CF Pages
id: cf-pages
uses: WalshyDev/cf-pages-await@v1
with:
commitHash: ${{ github.sha }}
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: "ba4e8f7f9ffbc23dba6acd0d9bd3ef46"
project: "dromzeh-dev"
githubToken: ${{ secrets.GITHUB_TOKEN }}
- run: | # purges cache on CF
curl -X \
-H "Authorization: ${{ secrets.CF_API_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}' \
https://api.cloudflare.com/client/v4/zones/2f0aebc3d15e4c1c38f303de3b34aa1f/purge_cache