Fix: null 값 처리 (#4) #28
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Java CI with Gradle / dev | |
on: | |
push: | |
branches: [ "BE" ] | |
pull_request: | |
branches: [ "BE" ] | |
permissions: | |
contents: read | |
env: | |
S3_BUCKET_NAME: travel-planner-buckets | |
CODE_DEPLOY_APP_NAME: travel-planner-app | |
CODE_DEPLOY_GROUP_NAME: travel-planner-dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SUBMODULE_TOKEN }} | |
submodules: true | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 | |
with: | |
arguments: build | |
gradle-version: 8.1.1 | |
# 프로젝트 압축 | |
- name: Make zip file | |
run: zip -r ./$GITHUB_SHA.zip ./ | |
shell: bash | |
# AWS 권한 확인 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-northeast-2 | |
- name: Upload to S3 | |
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/dev-server/$GITHUB_SHA.zip | |
# Deploy | |
- name: Deploy | |
run: | | |
aws deploy create-deployment \ | |
--application-name travel-planner-app \ | |
--deployment-config-name CodeDeployDefault.AllAtOnce \ | |
--deployment-group-name travel-planner-dev \ | |
--file-exists-behavior OVERWRITE \ | |
--s3-location bucket=travel-planner-buckets,bundleType=zip,key=dev-server/$GITHUB_SHA.zip \ | |
--region ap-northeast-2 \ |