Skip to content

Commit 88af582

Browse files
committed
Change frontend and backend workflows to trigger only on production branch
1 parent 25e98cf commit 88af582

File tree

3 files changed

+2
-88
lines changed

3 files changed

+2
-88
lines changed

.github/workflows/backend.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,8 @@ name: Deploy Backend Services
22

33
on:
44
push:
5-
branches: [ 'main' ]
6-
paths: [
7-
'services/question/**',
8-
'services/user/**',
9-
'services/match/**',
10-
'services/collaboration/**',
11-
]
5+
branches: [ 'production' ]
126

13-
# Allows you to run this workflow manually from the Actions tab
147
workflow_dispatch:
158

169
permissions:
@@ -35,17 +28,8 @@ jobs:
3528
- name: Checkout
3629
uses: actions/checkout@v4
3730

38-
- name: Check for changes in ${{ matrix.service }} directory
39-
uses: dorny/paths-filter@v3
40-
id: changes
41-
with:
42-
filters: |
43-
service:
44-
- '.services/${{ matrix.service }}/**'
45-
4631
- name: Configure AWS credentials
4732
id: aws-configure
48-
if: steps.changes.output.service == 'true'
4933
uses: aws-actions/[email protected]
5034
with:
5135
role-to-assume: ${{ secrets.AWS_BACKEND_ROLE }}
@@ -54,12 +38,10 @@ jobs:
5438

5539
- name: Login to AWS ECR
5640
id: login-ecr
57-
if: steps.changes.output.service == 'true'
5841
uses: aws-actions/[email protected]
5942

6043
- name: Build and push ${{ matrix.service }} image to AWS ECR
6144
id: build-image
62-
if: steps.changes.output.service == 'true'
6345
env:
6446
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
6547
ECR_REPOSITORY: ${{ matrix.service }}
@@ -71,7 +53,6 @@ jobs:
7153
7254
- name: Update AWS Service (${{ matrix.service }}) # Trigger re-deployment with latest image
7355
id: update-service
74-
if: steps.changes.output.service == 'true'
7556
env:
7657
ECS_SERVICE: ${{ matrix.service }}-service
7758
run: |

.github/workflows/backend_force.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/frontend.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Deploy Frontend
22

33
on:
44
push:
5-
branches: [ 'main' ]
6-
paths:
7-
- 'frontend/**'
5+
branches: [ 'production' ]
86

97
workflow_dispatch:
108

0 commit comments

Comments
 (0)