Skip to content

Version 5.3.17

Version 5.3.17 #61

Workflow file for this run

name: Deploy to Prod
# Trigger deployment only on push to master branch
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy to EC2 on master branch push
runs-on: ubuntu-latest
steps:
- name: Checkout the files
uses: actions/checkout@v4
- name: Deploy to EC2
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }}
REMOTE_HOST: ${{ secrets.HOST_DNS }}
REMOTE_USER: ${{ secrets.USERNAME }}
ARGS: '--delete'
TARGET: ${{ secrets.TARGET_DIR }}
- name: Restart Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_DNS }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd ${{ secrets.TARGET_DIR }}
cp ../.env .env
yarn install
pm2 reload pm2.json --update-env