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

Commit

Permalink
Merge pull request #292 from newrelic/alec/clear-cache
Browse files Browse the repository at this point in the history
Add workflow to clear cache on push
  • Loading branch information
aswanson-nr authored Jul 26, 2022
2 parents 8345fbb + 6721ad7 commit e4f6790
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 e4f6790

Please sign in to comment.