Skip to content

Commit 1bf0a2c

Browse files
committed
Fix purge
1 parent 21d2fbd commit 1bf0a2c

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

.github/actions/cloudflare-purge/action.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/deploy-production.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ jobs:
102102
runs-on: ubuntu-latest
103103
environment: production
104104
steps:
105-
- name: Invalidate datasheets cache
106-
uses: ./.github/actions/cloudflare-purge
107-
with:
108-
api-token: ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}
109-
zone: ${{ secrets.CLOUDFLARE_ZONE }}
110-
prefix: ${{ vars.DATASHEETS_BASE_URL }}
105+
- name: Purge Cloudflare Cache
106+
shell: bash
107+
run: |
108+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
109+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
110+
-H "Content-Type: application/json" \
111+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

.github/workflows/deploy-staging.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ jobs:
102102
runs-on: ubuntu-latest
103103
environment: staging
104104
steps:
105-
- name: Invalidate datasheets cache
106-
uses: ./.github/actions/cloudflare-purge
107-
with:
108-
api-token: ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}
109-
zone: ${{ secrets.CLOUDFLARE_ZONE }}
110-
prefix: ${{ vars.DATASHEETS_BASE_URL }}
105+
- name: Purge Cloudflare Cache
106+
shell: bash
107+
run: |
108+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
109+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
110+
-H "Content-Type: application/json" \
111+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

0 commit comments

Comments
 (0)