Skip to content

Commit

Permalink
Change frontend and backend workflows to trigger only on production b…
Browse files Browse the repository at this point in the history
…ranch
  • Loading branch information
McNaBry committed Nov 3, 2024
1 parent 25e98cf commit 88af582
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 88 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ name: Deploy Backend Services

on:
push:
branches: [ 'main' ]
paths: [
'services/question/**',
'services/user/**',
'services/match/**',
'services/collaboration/**',
]
branches: [ 'production' ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
Expand All @@ -35,17 +28,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Check for changes in ${{ matrix.service }} directory
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
service:
- '.services/${{ matrix.service }}/**'
- name: Configure AWS credentials
id: aws-configure
if: steps.changes.output.service == 'true'
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_BACKEND_ROLE }}
Expand All @@ -54,12 +38,10 @@ jobs:

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

- name: Build and push ${{ matrix.service }} image to AWS ECR
id: build-image
if: steps.changes.output.service == 'true'
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ matrix.service }}
Expand All @@ -71,7 +53,6 @@ jobs:
- name: Update AWS Service (${{ matrix.service }}) # Trigger re-deployment with latest image
id: update-service
if: steps.changes.output.service == 'true'
env:
ECS_SERVICE: ${{ matrix.service }}-service
run: |
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/backend_force.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Deploy Frontend

on:
push:
branches: [ 'main' ]
paths:
- 'frontend/**'
branches: [ 'production' ]

workflow_dispatch:

Expand Down

0 comments on commit 88af582

Please sign in to comment.