From 904a8de3f67bea3d2853ced5cadfa3b8a4689be0 Mon Sep 17 00:00:00 2001 From: can kurttekin Date: Tue, 19 Nov 2024 12:13:26 +0300 Subject: [PATCH] add backend path to deploy.yml to trigger only on changes in the backend directory --- .github/workflows/deploy.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 73d859d1..c2ca5713 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,8 @@ on: push: branches: - main + paths: + - 'backend/**' # Trigger only on changes in the backend directory jobs: deploy: @@ -25,14 +27,6 @@ jobs: chmod 600 ~/.ssh/id_rsa echo "SSH Key has been set up successfully" - # Debug Secrets - - name: Debug Secrets - run: | - echo "APP_URL=${{ secrets.APP_URL }}" - echo "EC2_USER=${{ secrets.EC2_USER }}" - echo "EC2_HOST=${{ secrets.EC2_HOST }}" - echo "AWS_DEFAULT_REGION=${{ secrets.AWS_DEFAULT_REGION }}" - # Copy backend files to EC2 - name: Deploy Application to EC2 env: