Skip to content

Commit

Permalink
had hardcoded home dir but user is now different
Browse files Browse the repository at this point in the history
  • Loading branch information
krachwal committed Jun 5, 2024
1 parent c15618d commit f091b2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cloud-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ jobs:
- name: Copy Docker image to EC2 instance
run: |
scp image.tar.gz ec2:/home/ubuntu
scp image.tar.gz ec2:/home/$EC2_USERNAME
- name: Stop Running Container
run: |
ssh ec2 'docker ps -q | xargs --no-run-if-empty docker stop | xargs --no-run-if-empty docker rm'
- name: Configure Docker & Load Image
run: |
ssh ec2 "docker load -i /home/ubuntu/image.tar.gz"
ssh ec2 "docker load -i /home/$EC2_USERNAME/image.tar.gz"
- name: Delete Gzipped Image Tarball
run: |
ssh ec2 "rm -f /home/ubuntu/image.tar.gz"
ssh ec2 "rm -f /home/$EC2_USERNAME/image.tar.gz"
- name: Run Docker container on EC2 instance
run: |
Expand Down

0 comments on commit f091b2a

Please sign in to comment.