english-back/.gitea/workflows/deploy.yml
deploy 2c4fd80773
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 34s
fix: use rsync instead of cp to prevent dist/dist nesting
2026-05-15 10:53:05 +00:00

28 lines
534 B
YAML

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
run: |
rsync -a --delete dist/ /home/hyoseung/english/back/dist/
cd /home/hyoseung/english/back
pm2 restart english-back || pm2 start dist/main.js --name english-back
pm2 save