Merge pull request #42 from asn6878/chore/continuous-deploy #1
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: | | |
cd /root/web05-Denamu | |
git pull origin main | |
cd server/ | |
npm install | |
npm build | |
pm2 start ecosystem.config.js | |
# TODO : 환경변수 추가 |