Skip to content

Commit

Permalink
Merge pull request #94 from CoolPeace-yanolza/develop
Browse files Browse the repository at this point in the history
swagger 관련 수정 버전 release
  • Loading branch information
tkddn204 authored Jan 10, 2024
2 parents 1f7f7d8 + 56cc377 commit bc140d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
run: ./gradlew build
shell: bash

- name: Gradle bootJar 패키징
run: ./gradlew bootJar
shell: bash

- name: .env 파일 제거
run: rm .env
shell: bash
Expand Down
13 changes: 9 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ sourceSets {
}

// Swagger UI 설정
def openapi3Path = "build/api-spec/openapi3.yaml"

openapi3 {
servers = [ { url = "http://localhost:8080" }, { url = "https://coolpeace.store" } ]
title = "CoolPeace API"
Expand All @@ -96,12 +94,15 @@ openapi3 {
format = "yaml"
}

def openapi3Path = "build/api-spec/openapi3.yaml"
def srcStaticDirPath = "src/main/resources/static/swagger-ui/"

tasks.register("copyToSwaggerUI") {
dependsOn "openapi3"
doLast {
copy {
from openapi3Path
into "src/main/resources/static/swagger-ui/"
into srcStaticDirPath
}
}
}
Expand All @@ -115,4 +116,8 @@ tasks.register("copyTextToSecurity") {
}
}

test.finalizedBy copyTextToSecurity
clean {
delete "$srcStaticDirPath/openapi3.yaml"
}

test.finalizedBy copyTextToSecurity

0 comments on commit bc140d1

Please sign in to comment.