Skip to content

Commit

Permalink
Update Deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jinseohyun1228 authored Nov 7, 2024
1 parent 649de5c commit d9b734d
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to AWS CodeDeploy
name: Deploy to AWS CodeDeploy

on:
push:
Expand Down Expand Up @@ -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 .
Expand All @@ -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: ${{

0 comments on commit d9b734d

Please sign in to comment.