Skip to content

Commit

Permalink
fix: ec2 ip 주소 secret key로 관리
Browse files Browse the repository at this point in the history
  • Loading branch information
useonglee committed Dec 16, 2023
1 parent 4aaa869 commit 37f9195
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
- name: Deploy to EC2
env:
IMAGE_TAG: ${{ github.sha }}
EC2_IP: ${{ secrets.EC2_IP_ADDRESS }}
run: |
echo "${{ secrets.EC2_SSH_PRIVATE_KEY }}" > private_key.pem
chmod 600 private_key.pem
ssh -i private_key.pem -o StrictHostKeyChecking=no ubuntu@3.35.8.185 "
ssh -i private_key.pem -o StrictHostKeyChecking=no ubuntu@$EC2_IP "
aws ecr get-login-password --region ap-northeast-2 |
sudo docker login --username AWS --password-stdin 903755389667.dkr.ecr.ap-northeast-2.amazonaws.com/linker &&
if [ \$(sudo docker ps -q -f name=linker) ]; then
Expand Down

0 comments on commit 37f9195

Please sign in to comment.