Skip to content

Commit 93aa65b

Browse files
authored
main <- develop (#405)
* Fix promo code input styles (#395) * Homepage design tweaks (#399) * Update deprecated timezones (#400) * Update deprecated timezones * remove comments * Allow editing of Order questions (#398) * Allow editing of Order questions * Update designs * Fix Checkout Bugs (#403) * Update deploy workflow
1 parent 880d38b commit 93aa65b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- main
77
- develop
8+
pull_request:
9+
types: [closed]
10+
branches:
11+
- main
12+
- develop
813
workflow_dispatch:
914
inputs:
1015
environment:
@@ -25,6 +30,8 @@ jobs:
2530
backend:
2631
name: Deploy Backend
2732
runs-on: ubuntu-latest
33+
# Only run this job when a PR is merged (not when closed without merging)
34+
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
2835

2936
steps:
3037
- uses: actions/checkout@v3
@@ -60,7 +67,7 @@ jobs:
6067
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
6168
echo "VAPOR_ENV=${{ github.event.inputs.environment }}" >> "$GITHUB_ENV"
6269
echo "TEST_MODE=${{ github.event.inputs.test_mode }}" >> "$GITHUB_ENV"
63-
elif [[ "${{ github.ref_name }}" == "develop" ]]; then
70+
elif [[ "${{ github.base_ref }}" == "develop" || "${{ github.ref_name }}" == "develop" ]]; then
6471
echo "VAPOR_ENV=staging" >> "$GITHUB_ENV"
6572
echo "TEST_MODE=false" >> "$GITHUB_ENV"
6673
else
@@ -70,7 +77,7 @@ jobs:
7077
7178
- name: Log Branch and Environment
7279
run: |
73-
echo "🚀 Deploying branch ${{ github.ref_name }} to Vapor environment: ${{ env.VAPOR_ENV }}"
80+
echo "🚀 Deploying to Vapor environment: ${{ env.VAPOR_ENV }}"
7481
echo "🧪 Test mode: ${{ env.TEST_MODE }}"
7582
7683
- name: Validate Deployment Configuration
@@ -92,6 +99,8 @@ jobs:
9299
name: Deploy Frontend
93100
runs-on: ubuntu-latest
94101
needs: backend
102+
# Only run this job when a PR is merged (not when closed without merging)
103+
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
95104

96105
steps:
97106
- uses: actions/checkout@v3
@@ -105,7 +114,7 @@ jobs:
105114
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_PRODUCTION_APP_ID }}" >> "$GITHUB_ENV"
106115
fi
107116
echo "TEST_MODE=${{ github.event.inputs.test_mode }}" >> "$GITHUB_ENV"
108-
elif [[ "${{ github.ref_name }}" == "develop" ]]; then
117+
elif [[ "${{ github.base_ref }}" == "develop" || "${{ github.ref_name }}" == "develop" ]]; then
109118
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_STAGING_APP_ID }}" >> "$GITHUB_ENV"
110119
echo "TEST_MODE=false" >> "$GITHUB_ENV"
111120
else

0 commit comments

Comments
 (0)