Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
try ssh into ec2 without another action
  • Loading branch information
alitpc25 authored Nov 26, 2023
1 parent 1fee826 commit 32d72ec
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
uses: actions/checkout@v4

- name: SSH into AWS EC2
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.AWS_EC2_HOST }}
username: ec2-user
key: ${{ secrets.AWS_PRIVATE_KEY }}
script: |
ls
env:
HOST: ${{ secrets.AWS_EC2_HOST }}
AWS_PRIVATE_KEY: ${{ secrets.AWS_PRIVATE_KEY }}
run: |
echo "$AWS_PRIVATE_KEY" > aws-secret-key.pem
chmod 600 aws-secret-key.pem
ssh -i ./aws-key.pem ec2-user@$HOST
ls
- name: Update and Install libssl-dev
run: |
Expand Down

0 comments on commit 32d72ec

Please sign in to comment.