From c5d359608052ecd5b9849d089054fcb1883d7183 Mon Sep 17 00:00:00 2001 From: jae hyun <1994dbwogus@gmail.com> Date: Wed, 11 Oct 2023 05:11:35 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=A1=9C=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20workflows=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - work dir 변경: soruce -> boombim - 임시 파일 로그 생성 명령 주석 처리 --- .github/workflows/deploy.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1724e8e..eb00869 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -95,13 +95,13 @@ jobs: - name: Run Build App run: npm run build - - name: Remove old server in ~/soruce (ignore error) + - name: Remove old server in ~/boombim (ignore error) run: | - rm -rf ~/source || true - - name: Copy new server to ~/soruce + rm -rf ~/boombim || true + - name: Copy new server to ~/boombim run: | - mkdir -p ~/source - cp -R ./ ~/source + mkdir -p ~/boombim + cp -R ./ ~/boombim # 백그라운드 실행 설정(데몬 실행 x) - name: Setting ENV and Run app @@ -110,10 +110,11 @@ jobs: ## [참고](https://www.praetorian.com/blog/self-hosted-github-runners-are-backdoors/) RUNNER_TRACKING_ID: 0 # or '' run: | - cd ~/source + cd ~/boombim PRODUCTION_ENV=${{ secrets.PRODUCTION_ENV }} echo $PRODUCTION_ENV | base64 --decode > .env export $(grep -E "^[^#]+=" .env) && rm .env - # 로그 임시로 ~/source 폴더에 저장 - nohup node dist/src/main.js >> ~/source/app.log 2>&1 & echo $! > node_pid + # 로그 임시로 ~/boombim 폴더에 저장 + #nohup node dist/src/main.js >> ~/boombim/app.log 2>&1 & echo $! > node_pid + nohup node dist/src/main.js & echo $! > node_pid disown $(cat node_pid)