Skip to content

fix: Validation, 422, and README (#43) #35

fix: Validation, 422, and README (#43)

fix: Validation, 422, and README (#43) #35

name: Push to EC2 Instance
on:
push:
branches:
- main # Only triggers on push to the main branch
jobs:
deploy:
name: Push to EC2 Instance
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v1
- name: Deploy code to EC2 instance
uses: easingthemes/[email protected]
env:
ARGS:
--exclude='.gitignore'
--exclude='.github/'
--exclude='js_version/'
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }}
SOURCE: "./"
REMOTE_HOST: ${{ secrets.EC2_HOST }}
REMOTE_USER: ${{ secrets.EC2_USER }}
TARGET: "~/src"
- name: Restart server on EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER}}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd ~/src
sudo systemctl restart server.service