Skip to content

Commit 4e3667e

Browse files
depdep
authored andcommitted
fix ssh
1 parent c79778d commit 4e3667e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/docker-deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ jobs:
5252
- name: Deploy to EC2
5353
run: |
5454
# SSH 키 설정
55-
mkdir -p ~/.ssh
56-
printf "%s" "${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/studyfy-server.pem
57-
chmod 600 ~/.ssh/studyfy-server.pem
55+
mkdir -p ~/.ssh # .ssh 디렉터리 생성
56+
printf "%s" "${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/studyfy-server.pem # PEM 키 파일 생성
57+
chmod 600 ~/.ssh/studyfy-server.pem # 적절한 권한 설정 (보안 상 필수)
58+
5859
5960
# EC2에 Docker 이미지를 배포하는 과정입니다.
6061
ssh -o StrictHostKeyChecking=no -i ~/.ssh/studyfy-server.pem ubuntu@${{ secrets.EC2_PUBLIC_IP }} << 'EOF'

0 commit comments

Comments
 (0)