diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 07c9e6b8..794cf252 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -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 diff --git a/build.gradle b/build.gradle index cf46a99d..95945f11 100644 --- a/build.gradle +++ b/build.gradle @@ -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" @@ -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 } } } @@ -115,4 +116,8 @@ tasks.register("copyTextToSecurity") { } } -test.finalizedBy copyTextToSecurity +clean { + delete "$srcStaticDirPath/openapi3.yaml" +} + +test.finalizedBy copyTextToSecurity \ No newline at end of file