Merge pull request #39 from CodeVac513/main #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "server/**" | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
steps: | |
# public 서버로 ssh 접속 | |
- name: ssh connection | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
node -v | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
node -v | |
cd /root/web05-Denamu | |
git pull origin main | |
cd server/ | |
npm ci | |
npm build | |
nohup npm run start_server > server.log 2>&1 & | |
# TODO : 환경변수 추가 |