Skip to content

Commit

Permalink
배포
Browse files Browse the repository at this point in the history
  • Loading branch information
jinseohyun1228 authored Nov 7, 2024
1 parent 964922f commit c440e76
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down

0 comments on commit c440e76

Please sign in to comment.