Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.FINUT_SSH_KEY }}
- name: Deploy to EC2
env:
EC2_HOST: ${{ secrets.FINUT_EC2_HOST }}
EC2_USER: ${{ secrets.FINUT_EC2_USER }}
run: |
ssh -o StrictHostKeyChecking=no $EC2_USER@$EC2_HOST 'cd app && ./deploy.sh'