Skip to content

Young-Season Backend Deployment #37

Young-Season Backend Deployment

Young-Season Backend Deployment #37

Workflow file for this run

name: Young-Season Backend Deployment
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
cd:
name: 'deploy'
runs-on: ubuntu-20.04
steps:
- name: EC2 ssh connection
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PEM }}
command_timeout: 3m
script: |
sudo apt-get update
sudo apt-get -y upgrade
cd /var/www/Young_Backend
sudo git pull origin dev
sudo npm install
sudo pm2 restart 0
exit 0