Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
feat: add workflow to clear cache on push
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanson-nr committed Jul 25, 2022
1 parent b2fcfa3 commit 6721ad7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/clear-website-cache.yml
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"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ Runs every 4 hours to pull in new quickstarts from Nerdgraph (New Relic's GraphQ

Runs every day to get various pages that relate to each quickstart from our vendor.

### Clear website cache

Runs on every push to the `main` branch and clears out the `newrelic.com/instant-observability` cache.
This can also be kicked off manually via a workflow run.

## ☁️ Hosting

- This site is built and hosted on [Gatsby Cloud](https://www.gatsbyjs.com/products/cloud/)
Expand Down

0 comments on commit 6721ad7

Please sign in to comment.