This repository has been archived by the owner on Dec 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add workflow to clear cache on push
- Loading branch information
1 parent
b2fcfa3
commit 6721ad7
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Clear website cache | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
|
||
jobs: | ||
clear-cache: | ||
runs-on: ubuntu-latest | ||
env: | ||
TOKEN: ${{ secrets.WEBSITE_CACHE_TOKEN }} | ||
steps: | ||
- name: Clear HTML | ||
run: | | ||
curl -X PURGE -H "Accept: application/json" -H "Fastly-Key: $TOKEN" -H "host: newrelic.com" --location "https://newrelic.com/instant-observability" | ||
- name: Clear page data | ||
run: | | ||
curl -X PURGE -H "Accept: application/json" -H "Fastly-Key: $TOKEN" -H "host: newrelic.com" --location "https://newrelic.com/instant-observability/page-data/index/page-data.json" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters