HOTFIX: swagger에 도메인 추가 #25
This file contains 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
name: Commitato Dev Server CI/CD Workflows | |
on: | |
push: | |
branches: [ "develop" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: production | |
permissions: | |
contents: read | |
steps: | |
- name: 브랜치 체크아웃 | |
uses: actions/checkout@v4 | |
- name: JDK 17 설정 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Gradle Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-${{ runner.os }} | |
- name: Gradle 빌드 | |
run: ./gradlew build | |
- name: 빌드 결과 압축 | |
run: zip -qq -r $GITHUB_SHA.zip . | |
- name: AWS 접근 설정 | |
uses: aws-actions/configure-aws-credentials@v2 | |
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: S3로 업로드 | |
run: aws s3 cp --region ${{ secrets.AWS_REGION }} ./$GITHUB_SHA.zip s3://${{ secrets.S3_BUCKET_NAME }}/${{ secrets.S3_BUCKET_DIR_NAME }}/$GITHUB_SHA.zip | |
- name: CodeDeploy를 사용하여 EC2에 배포 | |
run: | | |
aws deploy create-deployment \ | |
--application-name springboot-developer \ | |
--deployment-config-name CodeDeployDefault.AllAtOnce \ | |
--deployment-group-name ${{ secrets.DEPLOYMENT_GROUP_NAME }} \ | |
--s3-location bucket=${{ secrets.S3_BUCKET_NAME }},bundleType=zip,key=${{ secrets.S3_BUCKET_DIR_NAME }}/$GITHUB_SHA.zip |