From bccb29fd8ca27538acb53ab3f022c6bde27790ca Mon Sep 17 00:00:00 2001 From: aacara Date: Tue, 21 Nov 2023 17:32:13 +0900 Subject: [PATCH] Update gh_deploy.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deployment failed because a specified file already exists at this location: /home/ubuntu/github_action/.gitmessage.txt 에러 해결하기 위해 추가한 코드 --- scripts/gh_deploy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/gh_deploy.sh b/scripts/gh_deploy.sh index 3b46c53..e1c54c4 100644 --- a/scripts/gh_deploy.sh +++ b/scripts/gh_deploy.sh @@ -17,6 +17,10 @@ cp $BUILD_JAR $DEPLOY_PATH echo "> 현재 동작중인 어플리케이션 pid 체크" >> $DEPLOY_LOG_PATH CURRENT_PID=$(pgrep -f $JAR_NAME) +if [ -f "/home/ubuntu/github_action/.gitmessage.txt" ]; then + rm "/home/ubuntu/github_action/.gitmessage.txt" +fi + if [ -z $CURRENT_PID ] then echo "> 현재 동작중인 어플리케이션 존재 X" >> $DEPLOY_LOG_PATH