Skip to content

Commit 6e1ef80

Browse files
authored
Update Fastly workflow to purge after a successful Moda prod deploy (#53781)
1 parent af2d935 commit 6e1ef80

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/workflows/azure-prod-build-deploy.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ name: Azure Production - Build and Deploy
55
# **Who does it impact**: All contributors.
66

77
on:
8-
push:
9-
branches:
10-
- main
118
workflow_dispatch:
129

1310
permissions:

.github/workflows/purge-fastly.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name: Purge Fastly
55
# **Who does it impact**: Writers and engineers.
66

77
on:
8+
deployment_status:
89
workflow_dispatch:
910
inputs:
1011
nuke_all:
@@ -16,9 +17,6 @@ on:
1617
description: "Comma separated languages. E.g. 'en,ja, es' (defaults to all)"
1718
required: false
1819
default: ''
19-
push:
20-
branches:
21-
- main
2220

2321
permissions:
2422
contents: read
@@ -29,11 +27,12 @@ env:
2927

3028
jobs:
3129
send-purges:
30+
# Run when workflow_dispatch is the event (manual) or when deployment_status is the event (automatic) and it's a successful production deploy
3231
if: >-
3332
${{
3433
github.repository == 'github/docs-internal' &&
35-
(github.event_name != 'workflow_run' ||
36-
github.event.workflow_run.conclusion == 'success')
34+
(github.event_name != 'deployment_status' ||
35+
github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'production')
3736
}}
3837
runs-on: ubuntu-latest
3938
steps:

0 commit comments

Comments
 (0)