ci: Add Github Actions yaml file #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: Main Deploy Workflow | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: LawLow_BE | |
- run: cd LawLow_BE | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: yarn | |
- 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 |