Skip to content

Commit

Permalink
chore: 로그 수정으로 인한 workflows 수정
Browse files Browse the repository at this point in the history
- work dir 변경: soruce -> boombim
- 임시 파일 로그 생성 명령 주석 처리
  • Loading branch information
dbwogus94 committed Oct 10, 2023
1 parent 279f3e6 commit c5d3596
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

0 comments on commit c5d3596

Please sign in to comment.