Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 0 additions & 25 deletions .github/workflows/ci.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 워크플로의 이름 지정
name: CI/CD

# 워크플로가 시작될 조건 지정
on:
push:
branches: [ master ]

jobs:
builds:
runs-on: ubuntu-latest # 실행 환경 지정
# 실행 스템 지정
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew clean build

# 현재 시간 가져오기
- name: Get current time
uses: josStorer/get-current-time@v2.0.2
id: current-time
with:
fotmat: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

# 배포용 패키지 경로 저장
- name: Set artifact
run: echo "artifact=$(ls ./build/libs)" >> $GITHUB_ENV

# 빈스토크 배포
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: todogo
environment_name: Todogo-env
version_label: github-action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: ./build/libs/${{env.artifact}}
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.h2database:h2'
implementation 'com.mysql:mysql-connector-j'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.mysql:mysql-connector-j'
Expand All @@ -36,6 +37,10 @@ dependencies {
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

jar{
enabled = false
}

tasks.named('test') {
useJUnitPlatform()
}
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.defer-datasource-initialization=true

server.port=80

#spring.datasource.driver-class-name=org.h2.Driver
#spring.datasource.username=sa
#spring.h2.console.enabled=true
Loading