Skip to content

fix: deploy

fix: deploy #36

Workflow file for this run

name: Node CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install npm dependencies
run: npm ci
- name: Run build task
run: npm run build
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i --delete"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
SCRIPT_AFTER: |
cp /root/prod/mhinc/.env.local /root/projects/mhinc
cd /root/projects/mhinc
docker-compose build --no-cache
docker-compose up -d