diff --git a/.github/workflows/manually-purge-fastly.yml b/.github/workflows/manually-purge-fastly.yml new file mode 100644 index 0000000000..e4db1b03f4 --- /dev/null +++ b/.github/workflows/manually-purge-fastly.yml @@ -0,0 +1,29 @@ +name: Manually purge Fastly + +# **What it does**: Sends a soft-purge for the 'manual' Fastly surrogate key. +# **Why we have it**: When something is overly cached in the Fastly CDN and want to purge it. +# **Who does it impact**: Docs content. + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + purge: + runs-on: ubuntu-latest + + steps: + - name: Check out repo + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + + - name: Install dependencies + run: npm ci + + - name: Soft-purge Fastly cache + env: + FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }} + FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }} + FASTLY_SURROGATE_KEY: 'manual-purge' + run: .github/actions-scripts/purge-fastly-edge-cache.js