Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KiSeungMin authored Jul 17, 2024
1 parent 3b12133 commit facf6a7
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit facf6a7

Please sign in to comment.