Skip to content

Merge pull request #25 from Young-Season/feat/#19-hash-encryption #23

Merge pull request #25 from Young-Season/feat/#19-hash-encryption

Merge pull request #25 from Young-Season/feat/#19-hash-encryption #23

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
pm2 restart 0
exit 0