Skip to content

Commit

Permalink
Merge pull request #44 from ClothingStoreService/feature/CICD-aws-dep…
Browse files Browse the repository at this point in the history
…loy#3

feat:CI/CD s3 ec2 deploy
  • Loading branch information
hjj4060 authored Jun 11, 2024
2 parents ea6803a + 8f9beec commit bb37a82
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
env:
S3_BUCKET_NAME: clothstar-bucket
CODE_DEPLOY_APP_NAME: clothstar-deploy-v2
DEPLOYMENT_GROUP_NAME: clothstar_deploy
ZIP_FILE_NAME: clothstar-deploy.zip

name: aws-deploy
on:
Expand All @@ -19,7 +22,7 @@ jobs:
- name: Build with Gradle
run: ./gradlew build
- name: Make zip file
run: zip -r ./practice-deploy.zip .
run: zip -r ./$ZIP_FILE_NAME .
shell: bash
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -29,6 +32,12 @@ jobs:
aws-region: ap-northeast-2
- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./practice-deploy.zip s3://$S3_BUCKET_NAME/practice-deploy.zip
- name: Code Deploy
run: >
aws deploy create-deployment --application-name $CODE_DEPLOY_APP_NAME
--deployment-config-name CodeDeployDefault.AllAtOnce
--deployment-group-name $DEPLOYMENT_GROUP_NAME
--s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$ZIP_FILE_NAME

0 comments on commit bb37a82

Please sign in to comment.