File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -88,14 +88,22 @@ jobs:
8888 docker tag ${{ env.DOCKER_IMAGE_NAME }} $REPOSITORY_URI:${{ github.sha }}
8989 docker push $REPOSITORY_URI:${{ github.sha }}
9090
91+ - name : Debug SSH key setup
92+ run : |
93+ mkdir -p ~/.ssh
94+ echo "${{ secrets.EC2_PRIVATE_KEY }}" > ~/.ssh/id_rsa
95+ chmod 600 ~/.ssh/id_rsa
96+ ls -l ~/.ssh # 파일 존재 여부 및 권한 확인
97+ ssh-keyscan -H ${{ secrets.EC2_PUBLIC_IP }} >> ~/.ssh/known_hosts
98+
9199 # SSH 키 추가
92100 - name : Add SSH key
93101 run : |
94102 mkdir -p ~/.ssh
95103 echo "${{ secrets.EC2_PRIVATE_KEY }}" > ~/.ssh/id_rsa
96104 chmod 600 ~/.ssh/id_rsa
97105 ssh-keyscan -H ${{ secrets.EC2_PUBLIC_IP }} >> ~/.ssh/known_hosts
98-
106+ echo "SSH Key Added Successfully."
99107
100108 # EC2에서 컨테이너 실행
101109 - name : Deploy Docker container on EC2
You can’t perform that action at this time.
0 commit comments