From 138a20668ca0f728758da0d9d869e2ee03494457 Mon Sep 17 00:00:00 2001 From: gidskql6671 Date: Fri, 24 May 2024 16:30:41 +0900 Subject: [PATCH] TEST --- .github/workflows/deploy.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3cd406c..0d5299c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,26 +28,22 @@ jobs: script: | cd workspaces/1day1baek/back - # git reset --hard HEAD + git reset --hard HEAD - # cur_git_branch=$(git branch --show-current) - # if [ "$cur_git_branch" != "$BRANCH_NAME" ]; then - # git switch deploy/33-BE_cd - # fi - # git pull origin deploy/33-BE_cd + cur_git_branch=$(git branch --show-current) + if [ "$cur_git_branch" != "$BRANCH_NAME" ]; then + git switch deploy/33-BE_cd + fi + git pull origin deploy/33-BE_cd - # server_process=$(ps -ef | grep OneDayOneBaek-0.0.1-SNAPSHOT.jar$ | grep java) - # server_pid=(${server_process// / }) - # server_pid=${server_pid[1]} + server_process=$(ps -ef | grep OneDayOneBaek-0.0.1-SNAPSHOT.jar$ | grep java) + server_pid=(${server_process// / }) + server_pid=${server_pid[1]} - # if [ -n "$server_pid" ]; then - # echo "existed server pid : $server_pid" + if [ -n "$server_pid" ]; then + echo "existed server pid : $server_pid" - # echo $REMOTE_SSH_PASSWORD | sudo -S kill -9 $server_pid - # fi + echo $REMOTE_SSH_PASSWORD | sudo -S kill -9 $server_pid + fi - which asdf - asdf list - - ./gradlew clean build -x test - nohup java -Dspring.profiles.active=sandbox -jar build/libs/OneDayOneBaek-0.0.1-SNAPSHOT.jar > log.txt 2>&1 & \ No newline at end of file + ./run_sandbox.sh \ No newline at end of file