Skip to content

[DEV-51] 수강필요과목 목록 제거 - 현장실습 (#293) #26

[DEV-51] 수강필요과목 목록 제거 - 현장실습 (#293)

[DEV-51] 수강필요과목 목록 제거 - 현장실습 (#293) #26

Workflow file for this run

name: dev-depoly
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Build with Gradle
run: ./gradlew clean build
shell: bash
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00" # 한국 시간에 맞추기 위함
# grandle build를 통해 만들어진 jar를 beanstalk에 배포하기 위한 zip 파일로 만드는 것
- name: Generate deployment package
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cp Procfile deploy/Procfile
cp -r .ebextensions deploy/.ebextensions
cp -r .platform deploy/.platform
cd deploy && zip -r deploy.zip .
# Beanstalk Deploy 플러그인 사용
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} # github secrets로 등록한 값 사용
aws_secret_key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} # github secrets로 등록한 값 사용
application_name: staging-plzgraduation # EB application 이름
environment_name: staging-plzgraduation-env # EB environment 이름
version_label: Github Action-${{steps.current-time.outputs.formattedTime}} # 배포 버전은 타임스탬프를 이용하여 구분
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 180
- name: Test with Gradle
run: ./gradlew test --no-daemon