Skip to content

Commit

Permalink
config: BE Actions 수정(8)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-taewon-kim committed Oct 31, 2024
1 parent 3fb51f4 commit a00da9a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Transfer built files via SCP
run: |
cd ./be/dist
zip -r ../dist.zip .
zip -r ../dist.zip dist package.json pnpm-lock.yaml
cd ..
scp -P ${{ secrets.SERVER_PORT }} ./dist.zip ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}:/home/${{ secrets.SSH_USER }}/deploy/clovapatra/dist.zip
Expand All @@ -80,8 +80,13 @@ jobs:
port: ${{ secrets.SERVER_PORT }}
script: |
cd ~/deploy/clovapatra/
if pm2 list | grep -q "clovapatra"; then
pm2 delete clovapatra
fi
sudo rm -rf ./dist
unzip -o dist.zip -d ./dist/
rm dist.zip
pnpm install --prod
export PATH=$PATH:/home/${{ secrets.SSH_USER }}/.nvm/versions/node/v21.7.3/bin
pm2 delete clovapatra || true
pm2 start dist/main.js --name clovapatra
rm dist.zip
pm2 save

0 comments on commit a00da9a

Please sign in to comment.