Skip to content

Merge pull request #46 from DMU-DebugVisual/feat/notification-post-link #31

Merge pull request #46 from DMU-DebugVisual/feat/notification-post-link

Merge pull request #46 from DMU-DebugVisual/feat/notification-post-link #31

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main # main 브랜치 push 시 자동 배포
jobs:
deploy:
name: Deploy to EC2 Server
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.EC2_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.EC2_HOST }} >> ~/.ssh/known_hosts
- name: SSH and deploy
run: |
ssh ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "cd ~ && ./deploy.sh"