Skip to content

Commit

Permalink
fix(workflows): 배포 생성 시 코드 수정 위치 지정하지 않아 발생하는 오류 수정
Browse files Browse the repository at this point in the history
변경 후
- 파일 폴더 압축하여 저장하는 단계 추가
- S3 업로드 내용 추가
  • Loading branch information
kaswhy authored Nov 13, 2024
1 parent 0f60366 commit 1d3dd05
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v2

# 파일 및 폴더를 압축하여 server.zip으로 저장
- name: Zip distributions
run: zip -r server.zip .

# AWS 인증 정보 설정
- name: AWS configure credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -22,9 +26,14 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

# S3로 압축 파일 업로드
- name: upload to S3
run: aws s3 cp --region ${{ secrets.AWS_REGION }} ./server.zip s3://${{secrets.BUCKET_NAME}}/public

- name: Create deployment
run: |
aws deploy create-deployment \
--application-name ${{secrets.CODEDEPLOY_APP_NAME}} \
--deployment-config-name CodeDeployDefault.OneAtATime \
--deployment-group-name ${{secrets.CODEDEPLOY_DG_NAME}} \
--s3-location bucket=${{secrets.BUCKET_NAME}},bundleType=zip,key=public/server.zip

0 comments on commit 1d3dd05

Please sign in to comment.