fix : 배포그룹 지정 (#34) #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| name: main-deloy | |
| env: | |
| PROJECT_NAME: action_codedeploy | |
| jobs: | |
| deploy: | |
| name: DEPLOY | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| shell: bash | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| shell: bash | |
| - name: Make zip file | |
| run: zip -qq -r ./$GITHUB_SHA.zip . | |
| shell: bash | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: Upload to S3 | |
| run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://tailo-backend/$PROJECT_NAME/$GITHUB_SHA.zip | |
| - name: Code Deploy | |
| run: aws deploy create-deployment --application-name tailo --deployment-config-name CodeDeployDefault.OneAtATime --deployment-group-name growit --s3-location bucket=tailo-backend,bundleType=zip,key=$PROJECT_NAME/$GITHUB_SHA.zip | |