Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fivlao authored Jan 7, 2024
1 parent b77f0b9 commit 336613f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ jobs:

- name: Build Docker image
run: |
printf "%s\n" "$EC2_PRIVATE_KEY" > key.pem
cat key.pem
shell: bash
env:
EC2_PRIVATE_KEY: ${{ secrets.EC2_PRIVATE_KEY }}

mkdir -p ~/.ssh
echo "${{ secrets.PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
docker build . -f ./deploy/Dockerfile -t fivlao/sound:latest-dev
docker save fivlao/sound:latest-dev | ssh -i "~/.ssh/id_rsa" -C ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} sudo docker load

0 comments on commit 336613f

Please sign in to comment.