Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Fix double deployments (#409)

Dave Earleya555fdf262ea
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 2cc340dd3..0b607cc35 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -5,11 +5,6 @@ on:
branches:
- main
- develop
- pull_request:
- types: [closed]
- branches:
- - main
- - develop
workflow_dispatch:
inputs:
environment:
@@ -30,8 +25,6 @@ jobs:
backend:
name: Deploy Backend
runs-on: ubuntu-latest
- # Only run this job when a PR is merged (not when closed without merging)
- if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v3
@@ -67,7 +60,7 @@ jobs:
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "VAPOR_ENV=${{ github.event.inputs.environment }}" >> "$GITHUB_ENV"
echo "TEST_MODE=${{ github.event.inputs.test_mode }}" >> "$GITHUB_ENV"
- elif [[ "${{ github.base_ref }}" == "develop" || "${{ github.ref_name }}" == "develop" ]]; then
+ elif [[ "${{ github.ref_name }}" == "develop" ]]; then
echo "VAPOR_ENV=staging" >> "$GITHUB_ENV"
echo "TEST_MODE=false" >> "$GITHUB_ENV"
else
@@ -99,8 +92,6 @@ jobs:
name: Deploy Frontend
runs-on: ubuntu-latest
needs: backend
- # Only run this job when a PR is merged (not when closed without merging)
- if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v3
@@ -114,7 +105,7 @@ jobs:
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_PRODUCTION_APP_ID }}" >> "$GITHUB_ENV"
fi
echo "TEST_MODE=${{ github.event.inputs.test_mode }}" >> "$GITHUB_ENV"
- elif [[ "${{ github.base_ref }}" == "develop" || "${{ github.ref_name }}" == "develop" ]]; then
+ elif [[ "${{ github.ref_name }}" == "develop" ]]; then
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_STAGING_APP_ID }}" >> "$GITHUB_ENV"
echo "TEST_MODE=false" >> "$GITHUB_ENV"
else