Skip to content

ngnix

ngnix #4

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
paths:
- "backend/**"
concurrency:
group: deploy-production
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: 52.66.7.244
username: ubuntu
key: ${{ secrets.DEPLOY_KEY }}
command_timeout: 5m
script: |
set -e
cd ~/softwareProject
git pull origin main
cd backend
npm install --omit=dev
pm2 restart backend
pm2 save