From 429dc8cce8cf2af30eabc14e5d22c5ec17983dbb Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Thu, 9 May 2024 17:57:08 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs=20:=20API=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noti-service/.github/apidocs.yml | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 noti-service/.github/apidocs.yml diff --git a/noti-service/.github/apidocs.yml b/noti-service/.github/apidocs.yml new file mode 100644 index 00000000..dd20ca3f --- /dev/null +++ b/noti-service/.github/apidocs.yml @@ -0,0 +1,53 @@ +name: generate noti-service api docs + +on: + workflow_dispatch: + inputs: + branch: + description: 'Input branch info you want to generate' + required: true + +jobs: + document: + runs-on: self-hosted + steps: + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'zulu' + + - name: get doc + run: | + ./gradlew :noti-service:clean :noti-service:generateOpenApiDocs + + - name: generate document html + run: | + cp noti-service/build/docs/noti.json ./ + redocly bundle noti.json --output noti.yaml --ext yaml + yq -i '.info.title = "Noti-Service API Document"' noti.yaml + yq -i '.info.description = "Please contact Petstore backend if there are any issues with API"' noti.yaml + redocly build-docs noti.yaml --output noti.html + + - name: save build result to tmp dir + run: | + mkdir -p ../docs + mv noti.html ../docs + + - name: Checkout document branch + uses: actions/checkout@v3 +# with: +# ref: 'main' + +# - name: Move build artifacts +# run: | +# mkdir -p petstore # replace with your target path +# cp -R -f ../../_temp/petstore-fe.html petstore/fe.html +# +# - name: Commit and push build artifacts +# run: | +# git config user.name "GitHub Actions" +# git config user.email "line-document@linecorp.com" +# git add . +# git commit -m "Commit document artifacts" +# git push \ No newline at end of file