Skip to content

Commit 22a5813

Browse files
committed
Purge CF cache on deploy
Also: - update node - update ci actions
1 parent 7635087 commit 22a5813

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/gh-pages.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
# version: 9 # Not needed if you've set "packageManager" in package.json
3434
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
3535
- name: Setup Node
36-
uses: actions/setup-node@v4
36+
uses: actions/setup-node@v6
3737
with:
38-
node-version: 23
38+
node-version: 24
3939
cache: npm # or pnpm / yarn
4040
- name: Setup Pages
4141
uses: actions/configure-pages@v5
@@ -44,7 +44,7 @@ jobs:
4444
- name: Build with VitePress
4545
run: npm run home:build
4646
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v3
47+
uses: actions/upload-pages-artifact@v4
4848
with:
4949
path: home/.vitepress/dist
5050

@@ -61,6 +61,13 @@ jobs:
6161
id: deployment
6262
uses: actions/deploy-pages@v4
6363

64+
- name: Purge Cloudflare cache
65+
run: |
66+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_PURGE_CACHE_ZONEID }}/purge_cache" \
67+
-H "Authorization: Bearer ${{ secrets.CF_PURGE_CACHE_TOKEN }}" \
68+
-H "Content-Type: application/json" \
69+
--data "{\"hosts\": [\"www.collapselauncher.com\", \"collapselauncher.com\"]}"
70+
6471
test:
6572
permissions:
6673
actions: read

0 commit comments

Comments
 (0)