Skip to content

Commit

Permalink
add known hosts to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
walimorris committed Jul 30, 2024
1 parent d8fba60 commit 590982b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
echo "${{ secrets.EC2_KEY }}" > ~/.ssh/ec2-key.pem
chmod 600 ~/.ssh/ec2-key.pem
- name: Add EC2 host to known_hosts
run: |
ssh-keyscan -H ${{ secrets.EC2_IP }} >> ~/.ssh/known_hosts
- name: Deploy to EC2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down

0 comments on commit 590982b

Please sign in to comment.