Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hongsw authored Oct 31, 2023
1 parent 07f9be7 commit 7b634c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ jobs:
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOSTNAME: ${{secrets.SSH_HOST}}
USER_NAME: ${{secrets.USER_NAME}}

- name: set key
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
- name: scp

scp -i private_key README.md [email protected]:/home/ec2-user/app
- name: ssh

ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} '
ssh -o StrictHostKeyChecking=no -i private_key [email protected] '
cd /home/ec2-user/app &&
ls README.md
'
Expand Down

0 comments on commit 7b634c8

Please sign in to comment.