Skip to content

Create main_back.yml #1

Create main_back.yml

Create main_back.yml #1

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Deploy
uses: easingthemes/ssh-deploy@v2
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.SERVER_IP }}
REMOTE_USER: ${{ secrets.SERVER_USERNAME }}
REMOTE_PORT: ${{ secrets.SERVER_SSH_PORT }}
SOURCE: backend
TARGET: /var/www/duoasia