1
0
mirror of synced 2025-12-30 03:01:36 -05:00

stagger the default surrogate-key by language (#33202)

This commit is contained in:
Peter Bengtsson
2022-12-06 21:26:06 +01:00
committed by GitHub
parent 4f08a208a0
commit ff12bf6131
11 changed files with 198 additions and 43 deletions

View File

@@ -143,13 +143,6 @@ jobs:
run: |
az webapp deployment slot swap --slot canary --target-slot production -n ghdocs-prod -g docs-prod
- name: Purge Fastly edge cache
env:
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
FASTLY_SURROGATE_KEY: 'every-deployment'
run: npm install got && .github/actions-scripts/purge-fastly-edge-cache.js
send-slack-notification-on-failure:
needs: [azure-prod-build-and-deploy]
runs-on: ubuntu-latest

55
.github/workflows/purge-fastly.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Purge Fastly
# **What it does**: Sends a soft-purge to Fastly.
# **Why we have it**: So that, right after a production deploy, we start afresh
# **Who does it impact**: Writers and engineers.
on:
workflow_dispatch:
inputs:
nuke_all:
description: "Nuke all 'every-deployment' keys independent of language"
required: false
type: boolean
default: false
languages:
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
required: false
default: ''
workflow_run:
workflows: ['Azure Production - Build and Deploy']
types:
- completed
permissions:
contents: read
env:
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
jobs:
send-purges:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with:
node-version: '16.17.0'
cache: npm
- name: Install dependencies
run: npm ci
- name: Purge Fastly edge cache independent of language
if: ${{ github.event.inputs.nuke_all }}
run: .github/actions-scripts/purge-fastly-edge-cache.js
- name: Purge Fastly edge cache per language
if: ${{ !github.event.inputs.nuke_all }}
env:
LANGUAGES: ${{ github.event.inputs.languages }}
run: .github/actions-scripts/purge-fastly-edge-cache-per-language.js