Skip to content

Commit be58c2f

Browse files
committed
Merge branch 'fix/deploy-vendors' into staging
2 parents 0723271 + dd8dbb1 commit be58c2f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/deploy-vendors.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Deploy Vendor Folders
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows:
6+
- "Publish Website"
57
branches:
68
- trunk
79
- staging
10+
types:
11+
- completed
812
workflow_dispatch:
913
inputs:
1014
dry_run:
@@ -16,7 +20,11 @@ jobs:
1620
deploy-vendors:
1721
name: Build and Deploy Vendor Folders
1822
runs-on: ubuntu-latest
19-
environment: ${{ github.ref_name == 'trunk' && 'production' || 'staging' }}
23+
# For workflow_run events, only proceed if the upstream workflow succeeded.
24+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
25+
# workflow_run executes in the context of the default branch, so use
26+
# head_branch from the event payload to select the right environment.
27+
environment: ${{ (github.event.workflow_run.head_branch || github.ref_name) == 'trunk' && 'production' || 'staging' }}
2028

2129
steps:
2230
- name: Checkout

0 commit comments

Comments
 (0)