Skip to content

[Refactor] 코스 조회 API 예외 케이스 추가 #36

[Refactor] 코스 조회 API 예외 케이스 추가

[Refactor] 코스 조회 API 예외 케이스 추가 #36

Workflow file for this run

name: demo Dev CI/CD
on:
pull_request:
types: [closed]
workflow_dispatch: # (2).수동 실행도 가능하도록
jobs:
build:
runs-on: ubuntu-latest # (3).OS환경
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop'
steps:
- name: Checkout
uses: actions/checkout@v2 # (4).코드 check out
# 위에서 기재한 develop 브랜치의 코드를 가져옴
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17 # (5).자바 설치
distribution: 'adopt'
# 깃허브 자체적으로 자바 jdk를 설치함
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash # (6).권한 부여
# gradle이 들어갈 대상에 권한을 부여함
- name: Build with Gradle
run: ./gradlew clean build -x test
shell: bash # (7).build시작
# (5), (6), (7) - Github Actions를 이용해서 Jar 파일을 만드는 과정
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00" # (8).build시점의 시간확보
- name: Show Current Time
run: echo "CurrentTime=$"
shell: bash # (9).확보한 시간 보여주기
# (8), (9) - 타임스탬프를 기록하기 위한 과정
- name: Generate deployment package
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cp Procfile deploy/Procfile
cp -r .ebextensions-dev deploy/.ebextensions
cp -r .platform deploy/.platform
cd deploy && zip -r deploy.zip .
# Github Action을 통해 깃허브가 자체적으로 리눅스 가상 환경을 만들어서
# 배포에 필요한 빌드 과정을 진행하는 과정
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACTION_ACCESS_KEY_ID }} # 깃허브에 secrets로 설정함
aws_secret_key: ${{ secrets.AWS_ACTION_SECRET_ACCESS_KEY }} # 깃허브에 secrets로 설정함
application_name: Ddareunging-dev
environment_name: Ddareunging-dev-env # Elastic Beanstalk명
version_label: github-action-${{ steps.current-time.outputs.formattedTime }} # 타임스탬프
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_deployment: false