diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index caa8ab9f..bd28667f 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -1,4 +1,4 @@ -name: Deploy to AWS CodeDeploy +name: Deploy to AWS CodeDeploy on: push: @@ -28,15 +28,15 @@ jobs: - name: Create application.properties from Secrets run: | echo "Current directory: $(pwd)" - mkdir -p src/main/resources - echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.properties - cat ./src/main/resources/application.properties + mkdir -p boomerang/src/main/resources + echo "${{ secrets.APPLICATION }}" > ./boomerang/src/main/resources/application.properties + cat ./boomerang/src/main/resources/application.properties - name: Grant execute permission for gradlew - run: chmod +x ./gradlew + run: chmod +x ./boomerang/gradlew - name: Build with Gradle - run: ./gradlew build -x test + run: ./boomerang/gradlew build -x test - name: Make zip file run: zip -r application.zip . @@ -46,18 +46,4 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.REGION }} - - - name: Upload to S3 - run: aws s3 cp application.zip s3://$S3_BUCKET_NAME/application.zip - - # CodeDeploy를 통해 배포만 수행 - - name: Deploy with CodeDeploy - run: | - aws deploy create-deployment \ - --application-name $APPLICATION_NAME \ - --deployment-config-name CodeDeployDefault.AllAtOnce \ - --deployment-group-name $DEPLOYMENT_GROUP_NAME \ - --file-exists-behavior OVERWRITE \ - --s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=application.zip \ - --region $REGION + aws-region: ${{