Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhapple authored Dec 10, 2024
1 parent 79ea816 commit 4391282
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@ jobs:
env:
KEY: ${{ secrets.FRONTEND_EC2_KEY }}

# 4. 빌드 파일을 EC2 서버로 전송
# 4. EC2 서버에서 디렉터리 생성 및 권한 설정
- name: Prepare Remote Directory
run: |
ssh -o StrictHostKeyChecking=no -i /tmp/deploy_key.pem $USER@$HOST "
sudo mkdir -p /home/ubuntu/project/dist && \
sudo chown -R ubuntu:ubuntu /home/ubuntu/project && \
chmod -R 755 /home/ubuntu/project
"
env:
HOST: ${{ secrets.FRONTEND_EC2_HOST }}
USER: ${{ secrets.FRONTEND_EC2_USER }}

# 5. 빌드 파일을 EC2 서버로 전송
- name: Upload build files to EC2
run: |
scp -o StrictHostKeyChecking=no -i /tmp/deploy_key.pem -r ./dist/. $USER@$HOST:/home/ubuntu/project/dist
Expand Down

0 comments on commit 4391282

Please sign in to comment.