Skip to content

Commit 91607a4

Browse files
committed
[config] GitHub Actions workflow 스크립트 수정
- 변경된 서비스에 대해서만 배포
1 parent 6281fd7 commit 91607a4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/dev-deploy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
chmod 600 private_key
5858
5959
- name: 가게노출 서비스 배포
60-
if: steps.check_changes.outputs.restaurant-exposure == 'false'
60+
if: steps.check_changes.outputs.restaurant-exposure == 'true'
6161
env:
6262
HOST: ${{ secrets.DEV_EC2_HOST1 }}
6363
USER: ${{ secrets.DEV_EC2_USER }}
@@ -71,7 +71,7 @@ jobs:
7171
EOF
7272
7373
- name: 검색 서비스 배포
74-
if: steps.check_changes.outputs.search == 'false'
74+
if: steps.check_changes.outputs.search == 'true'
7575
env:
7676
HOST: ${{ secrets.DEV_EC2_HOST2 }}
7777
USER: ${{ secrets.DEV_EC2_USER }}
@@ -86,7 +86,7 @@ jobs:
8686
8787
- name: 기타 서비스 배포
8888
if: |
89-
steps.check_changes.outputs.cache == 'false' ||
89+
steps.check_changes.outputs.cache == 'true' ||
9090
steps.check_changes.outputs.advertisement == 'true' ||
9191
steps.check_changes.outputs.coupon == 'true' ||
9292
steps.check_changes.outputs.delivery-time == 'true' ||
@@ -95,7 +95,7 @@ jobs:
9595
HOST: ${{ secrets.DEV_EC2_HOST3 }}
9696
USER: ${{ secrets.DEV_EC2_USER }}
9797
run: |
98-
if [[ "${{ steps.check_changes.outputs.cache }}" == 'false' ]]; then
98+
if [[ "${{ steps.check_changes.outputs.cache }}" == 'true' ]]; then
9999
scp -o StrictHostKeyChecking=no -i private_key service/cache-service/build/libs/*.jar ${USER}@${HOST}:~/cache-service.jar
100100
ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} << EOF
101101
pkill -f 'java -jar cache-service.jar' || true
@@ -104,7 +104,7 @@ jobs:
104104
nohup java -jar cache-service.jar --spring.profiles.active=dev > cache-service.log 2>&1 &
105105
EOF
106106
fi
107-
if [[ "${{ steps.check_changes.outputs.advertisement }}" == 'false' ]]; then
107+
if [[ "${{ steps.check_changes.outputs.advertisement }}" == 'true' ]]; then
108108
scp -o StrictHostKeyChecking=no -i private_key service/advertisement-service/build/libs/*.jar ${USER}@${HOST}:~/advertisement-service.jar
109109
ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} << EOF
110110
pkill -f 'java -jar advertisement-service.jar' || true
@@ -113,7 +113,7 @@ jobs:
113113
nohup java -jar advertisement-service.jar --spring.profiles.active=dev > advertisement-service.log 2>&1 &
114114
EOF
115115
fi
116-
if [[ "${{ steps.check_changes.outputs.coupon }}" == 'false' ]]; then
116+
if [[ "${{ steps.check_changes.outputs.coupon }}" == 'true' ]]; then
117117
scp -o StrictHostKeyChecking=no -i private_key service/coupon-service/build/libs/*.jar ${USER}@${HOST}:~/coupon-service.jar
118118
ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} << EOF
119119
pkill -f 'java -jar coupon-service.jar' || true
@@ -122,7 +122,7 @@ jobs:
122122
nohup java -jar coupon-service.jar --spring.profiles.active=dev > coupon-service.log 2>&1 &
123123
EOF
124124
fi
125-
if [[ "${{ steps.check_changes.outputs.delivery-time }}" == 'false' ]]; then
125+
if [[ "${{ steps.check_changes.outputs.delivery-time }}" == 'true' ]]; then
126126
scp -o StrictHostKeyChecking=no -i private_key service/delivery-time-service/build/libs/*.jar ${USER}@${HOST}:~/delivery-time-service.jar
127127
ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} << EOF
128128
pkill -f 'java -jar delivery-time-service.jar' || true
@@ -131,7 +131,7 @@ jobs:
131131
nohup java -jar delivery-time-service.jar --spring.profiles.active=dev > delivery-time-service.log 2>&1 &
132132
EOF
133133
fi
134-
if [[ "${{ steps.check_changes.outputs.restaurant }}" == 'false' ]]; then
134+
if [[ "${{ steps.check_changes.outputs.restaurant }}" == 'true' ]]; then
135135
scp -o StrictHostKeyChecking=no -i private_key service/restaurant-service/build/libs/*.jar ${USER}@${HOST}:~/restaurant-service.jar
136136
ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} << EOF
137137
pkill -f 'java -jar restaurant-service.jar' || true

0 commit comments

Comments
 (0)