Skip to content

Commit d3d2b70

Browse files
authored
Merge pull request #34 from ije90s/dev
작동 중지 방어 코드 추가
2 parents d0a1e6d + 0dc5efd commit d3d2b70

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/cicd_test.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ jobs:
2727
- name: Build
2828
run: npm run build
2929

30-
- name: .env 확인
31-
uses: appleboy/ssh-action@v1.0.3
32-
with:
33-
host: ${{ secrets.EC2_HOST }}
34-
username: ${{ secrets.EC2_USERNAME }}
35-
key: ${{ secrets.EC2_PRIVATE_KEY }}
36-
script_stop: true
37-
scripts: |
38-
test -f /home/ubuntu/.env.prod || exit 1
39-
4030
- name: Zip
4131
run: tar -czf $GITHUB_SHA.tar.gz appspec.yml scripts dist package.json package-lock.json ecosystem.config.js
4232

scripts/after_install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ ENV_SRC=/home/ubuntu/.env.prod
66
ENV_DST=$APP_DIR/.env
77
ENV_BAK=$APP_DIR/.env.bak
88

9+
if [ ! -f "$ENV_SRC" ]; then
10+
echo ".env.prod not found"
11+
exit 1
12+
fi
13+
914
if [ -f "$ENV_DST" ]; then
1015
cp "$ENV_DST" "$ENV_BAK"
1116
fi

0 commit comments

Comments
 (0)