Skip to content

chore: monitoring 연동 #7

chore: monitoring 연동

chore: monitoring 연동 #7

Workflow file for this run

name: Deploy to EC2 on Push
on:
workflow_dispatch:
push:
branches: ["main", "develop"]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install SSH key
run: echo "${{ secrets.EC2_PRIVATE_KEY }}" > /tmp/private_key.pem && chmod 600 /tmp/private_key.pem
- name: Deploy to EC2
run: |
ssh -i /tmp/private_key.pem -o StrictHostKeyChecking=no ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} "~/deploy-script.sh"