Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue/2 Ci: dev_deploy.yml 생성 #3

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: infoU dev CI/CD # Workflow 이름

on:
pull_request:
branches:
- dev
types:
- closed
workflow_dispatch: # 수동 실행도 가능하도록

jobs:
build:
runs-on: ubuntu-latest # OS 환경 세팅
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'dev' # PR이 Merge되고, base branch가 dev일 때만 실행

steps:
- name: Checkout
uses: actions/checkout@v2 # .github 디렉토리 하위 계층의 모든 코드 확인

# java 설치
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'

# gradlew 실행 권한 부여
- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

# 테스트를 제외한 빌드 시작
- name: Build with Gradle
run: ./gradlew build -x test
shell: bash

- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DD HH:mm:ss
utcOffset: '+09:00' # build 시점의 시간을 기록

- name: Show current time
run: echo "Current time is ${{ steps.current-time.outputs.time }}"
shell: bash

- 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 .

- name: BeanStalk Deploy
uses: einaregilsson/beanstalk-deploy@v20






Loading