Skip to content

Commit

Permalink
ensure remote directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzadimahdi committed Dec 29, 2024
1 parent 05fc440 commit 8e8b0f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/infrastructure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ jobs:
echo "${{ secrets.EC2_SSH_PRIVATE_KEY }}" > ~/ec2-key.pem
chmod 400 ~/ec2-key.pem
# Ensure remote directory exists
ssh -i ~/ec2-key.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.EC2_SSH_ADDRESS }} "mkdir -p /opt/deployment/"
# copy files
scp -i ~/ec2-key.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ./* ${{ secrets.EC2_SSH_ADDRESS }}:/opt/deployment/
Expand Down

0 comments on commit 8e8b0f8

Please sign in to comment.