Skip to content

Commit

Permalink
Update Fastly workflow to purge after a successful Moda prod deploy (…
Browse files Browse the repository at this point in the history
…#53781)
  • Loading branch information
Ebonsignori authored Jan 6, 2025
1 parent af2d935 commit 6e1ef80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/azure-prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ name: Azure Production - Build and Deploy
# **Who does it impact**: All contributors.

on:
push:
branches:
- main
workflow_dispatch:

permissions:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/purge-fastly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Purge Fastly
# **Who does it impact**: Writers and engineers.

on:
deployment_status:
workflow_dispatch:
inputs:
nuke_all:
Expand All @@ -16,9 +17,6 @@ on:
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
required: false
default: ''
push:
branches:
- main

permissions:
contents: read
Expand All @@ -29,11 +27,12 @@ env:

jobs:
send-purges:
# Run when workflow_dispatch is the event (manual) or when deployment_status is the event (automatic) and it's a successful production deploy
if: >-
${{
github.repository == 'github/docs-internal' &&
(github.event_name != 'workflow_run' ||
github.event.workflow_run.conclusion == 'success')
(github.event_name != 'deployment_status' ||
github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'production')
}}
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 6e1ef80

Please sign in to comment.