From 448b6568876b42c21d7905a97628feb7e5c7d67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= Date: Wed, 28 Aug 2024 15:21:55 +0200 Subject: [PATCH] upload swagger.json as an artifact --- .github/workflows/build_swagger.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_swagger.yml b/.github/workflows/build_swagger.yml index ce33b565b2..9093c1caf6 100644 --- a/.github/workflows/build_swagger.yml +++ b/.github/workflows/build_swagger.yml @@ -16,32 +16,16 @@ jobs: with: java-version: '17' maven-version: '3.9.6' - #- name: Build - # run: mvn --batch-mode install -DskipTests - name: Get swagger.json run: | cd ./services/alarm-logger mvn spring-boot:run & export jobpid="$!" sleep 30 - curl http://localhost:8080 - curl http://localhost:8080/v3/api-docs --output ../../docs/swagger/swagger.json + curl http://localhost:8080/v3/api-docs --output ../../docs/swagger.json kill "$jobpid" - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - name: Install dependencies - run: | - cd docs/swagger - npm install - - name: Run converter - run: | - cd docs/swagger - node convertMarkDown.js - ls - - name: Archive swagger.md + - name: Archive swagger.json uses: actions/upload-artifact@v4 with: - name: markdown - path: docs/swagger/swagger.md + name: swagger.json + path: docs/swagger.json