Fix(Map): search Api paging 오류 & dev branch merge 오류 #40
Workflow file for this run
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: Java CD with Gradle | |
on: | |
pull_request: | |
types: [ closed ] | |
branches: [ "dev","main" ] | |
env: | |
AWS_REGION: ap-northeast-2 | |
S3_BUCKET_NAME: github-actions-s3-bucket-mapu-backend | |
CODE_DEPLOY_APPLICATION_NAME: mapu_backend_codedeploy | |
CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: mapu_backend_codedeploy | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
environment: develop | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set Release YML File | |
run: | | |
cd ./src/main/resources | |
touch ./application.yml | |
echo "${{ secrets.RELEASE_YML }}" >./application.yml | |
- name: Set Release Test YML File | |
run: | | |
cd ./src/test/resources | |
touch ./application.yml | |
echo "${{ secrets.RELEASE_TEST_YML }}" >./application.yml | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build with Gradle Wrapper | |
run: ./gradlew build --exclude-task test | |
#AWS 인증 | |
- 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: ${{ env.AWS_REGION }} | |
#빌드 결과물 S3 버킷에 업로드 | |
- name: Upload to AWS S3 | |
run: | | |
aws deploy push \ | |
--application-name ${{ env.CODE_DEPLOY_APPLICATION_NAME }} \ | |
--ignore-hidden-files \ | |
--s3-location s3://$S3_BUCKET_NAME/$GITHUB_SHA.zip \ | |
--source . | |
#S3 버킷에 있는 파일 CodeDeploy 실행 | |
- name: Deploy to AWS EC2 from S3 | |
run: | | |
aws deploy create-deployment \ | |
--deployment-config-name CodeDeployDefault.AllAtOnce \ | |
--application-name ${{ env.CODE_DEPLOY_APPLICATION_NAME }} \ | |
--deployment-group-name ${{ env.CODE_DEPLOY_DEPLOYMENT_GROUP_NAME }} \ | |
--s3-location bucket=$S3_BUCKET_NAME,key=$GITHUB_SHA.zip,bundleType=zip |