Skip to content

Commit

Permalink
feat: 자동화 배포를 위한 S3 업로드 및 codeDeploy 스크립트 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
KangJiSseok committed Mar 11, 2024
1 parent bd78291 commit 3310bd7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,10 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Configure AWS credential
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ap-northeast-2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Upload to S3
working-directory: ./BackEnd
run: aws deploy push --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --ignore-hidden-files --s3-location s3://${{ env.AWS_S3_BUCKET }}/4K-Backend-EC2/$GITHUB_SHA.zip --source .

- name: Code Deploy to EC2
working-directory: ./BackEnd
run: aws deploy create-deployment application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} deployment-config-name CodeDeployDefault.AllAtOnce deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} s3-location bucket=${{ env.AWS_S3_BUCKET }},key=4K-Backend-EC2/$GITHUB_SHA.zip,bundleType=zip
run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=${{ env.AWS_S3_BUCKET }},key=4K-Backend-EC2/$GITHUB_SHA.zip,bundleType=zip

0 comments on commit 3310bd7

Please sign in to comment.