diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c49366d..0cd4398 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -69,18 +69,21 @@ jobs: aws-access-key-id: ${{ secrets.AWS_CICD_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_CICD_SECRET_ACCESS_KEY }} - # S3 Bucket으로 copy - - name: S3에 배포 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} - run: | - aws s3 cp ./springboot-ono-backend-build.zip s3://dev-an2-ono-bucket/ \ - --region ap-northeast-2 \ - --acl private + # # S3 Bucket으로 copy + # - name: S3에 배포 + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} + # run: | + # aws s3 cp ./springboot-ono-backend-build.zip s3://dev-an2-ono-bucket/ \ + # --region ap-northeast-2 \ + # --acl private + + - name: S3에 업로드 + run: aws deploy push --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --ignore-hidden-files --s3-location s3://$AWS_S3_BUCKET/$GITHUB_SHA.zip --source . - name: EC2에 배포 - 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=$AWS_S3_BUCKET,key=springboot-ono-backend-build.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=$AWS_S3_BUCKET,key=/$GITHUB_SHA.zip,bundleType=zip # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.