Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KalinduSuraj authored Dec 29, 2024
1 parent 725d76c commit 0cc0708
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,24 @@ jobs:
ssh-keyscan -H ec2-13-49-75-219.eu-north-1.compute.amazonaws.com >> ~/.ssh/known_hosts
# Test EC2 Host Connectivity
- name: Test Connectivity
run: ping -c 4 ${{ secrets.HOST }}

# Add EC2 Host to Known Hosts
- name: Add EC2 Host to Known Hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts
# Debug SSH Connection
- name: Debug SSH Connection
env:
HOST: ${{ secrets.HOST }}
USER: ${{ secrets.USER }}
run: ssh -i private_key.pem $USER@$HOST echo "SSH connection successful"


# Deploy to AWS EC2
- name: Deploy to AWS EC2
env:
Expand Down

0 comments on commit 0cc0708

Please sign in to comment.