build: Add ecosystem file for pm2 setting #4
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: Main Deploy Workflow | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout Process | |
uses: actions/checkout@v3 | |
with: | |
path: LawLow_BE | |
- name: Setting Node.js version | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: yarn # caching npm dependencies | |
- name: executing remote ssh commands using key | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.NCP_SERVER_IP }} | |
username: ${{ secrets.NCP_SERVER_USER }} | |
password: ${{ secrets.NCP_SERVER_PW }} | |
port: ${{ secrets.NCP_SERVER_PORT }} | |
script: | | |
yarn install | |
yarn build | |
pm2 reload all |