Skip to content

Commit 84f323f

Browse files
author
Peter Bengtsson
authored
Ability to soft-purge Fastly with a click of a button (#23508)
* Ability to soft-purge Fastly with a click of a button * permissions * install dependencies would help
1 parent 9782b80 commit 84f323f

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Manually purge Fastly
2+
3+
# **What it does**: Sends a soft-purge for the 'manual' Fastly surrogate key.
4+
# **Why we have it**: When something is overly cached in the Fastly CDN and want to purge it.
5+
# **Who does it impact**: Docs content.
6+
7+
on:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
purge:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check out repo
19+
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Soft-purge Fastly cache
25+
env:
26+
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
27+
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
28+
FASTLY_SURROGATE_KEY: 'manual-purge'
29+
run: .github/actions-scripts/purge-fastly-edge-cache.js

0 commit comments

Comments
 (0)