Skip to content

Commit

Permalink
Revert "fix comparing main branch with backend"
Browse files Browse the repository at this point in the history
This reverts commit f0485e0.
  • Loading branch information
cankurttekin committed Nov 24, 2024
1 parent 5ca9fda commit d8593d3
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on:
workflow_run:
workflows: ["CI Pipeline"]
types:
- completed # Trigger deploy when CI has completed
- completed # Trigger deploy when CI has completed
#push:
# branches:
#- main
# paths:
# - 'backend/**' # Trigger only on changes in the backend directory

jobs:
deploy:
Expand All @@ -21,16 +26,8 @@ jobs:
- name: Check for Changes in Backend
id: check_changes
run: |
git fetch origin main
CHANGES=$(git diff --name-only origin/main...${{ github.sha }} | grep -E '^backend/')
echo "Changes in backend: $CHANGES"
if [ -z "$CHANGES" ]; then
echo "No changes detected in the backend directory"
echo "changes=no" >> $GITHUB_ENV
else
echo "Changes detected in the backend directory"
echo "changes=yes" >> $GITHUB_ENV
fi
git diff --exit-code --quiet backend/
echo "changes=$(if [ $? -eq 0 ]; then echo 'no'; else echo 'yes'; fi)" >> $GITHUB_ENV
# Skip deploy if no changes in backend
- name: Skip deploy if no changes in backend
Expand Down

0 comments on commit d8593d3

Please sign in to comment.