diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index 41f203dd..831600d0 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -25,24 +25,19 @@ jobs: java-version: '21' distribution: 'temurin' - - name: Move to boomerang folder - working-directory: ./boomerang + - 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 + echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.properties + cat ./src/main/resources/application.properties - name: Grant execute permission for gradlew - working-directory: ./boomerang run: chmod +x ./gradlew - name: Build with Gradle - working-directory: ./boomerang run: ./gradlew build -x test - name: Make zip file - run: zip -r application.zip ./boomerang + run: zip -r application.zip . - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -54,20 +49,7 @@ jobs: - name: Upload to S3 run: aws s3 cp application.zip s3://$S3_BUCKET_NAME/application.zip - - name: Create CodeDeploy Application (if it doesn't exist) - run: | - aws deploy create-application --application-name $APPLICATION_NAME --compute-platform Server || echo "Application $APPLICATION_NAME already exists." - - - name: Create CodeDeploy Deployment Group (if it doesn't exist) - run: | - aws deploy create-deployment-group \ - --application-name $APPLICATION_NAME \ - --deployment-group-name $DEPLOYMENT_GROUP_NAME \ - --service-role-arn ${{ secrets.CODEDEPLOY_SERVICE_ROLE_ARN }} \ - --deployment-config-name CodeDeployDefault.AllAtOnce \ - --ec2-tag-filters Key=Name,Value=YourInstanceTagName,Type=KEY_AND_VALUE \ - --auto-scaling-groups YourAutoScalingGroupName || echo "Deployment group $DEPLOYMENT_GROUP_NAME already exists." - + # CodeDeploy를 통해 배포만 수행 - name: Deploy with CodeDeploy run: | aws deploy create-deployment \