diff --git a/.github/actions/publish-autodoc/action.yml b/.github/actions/publish-autodoc/action.yml index 2c1bee3..43a5aec 100644 --- a/.github/actions/publish-autodoc/action.yml +++ b/.github/actions/publish-autodoc/action.yml @@ -25,9 +25,12 @@ runs: - name: Merge manifests shell: bash run: ./gradlew mergeManifests - - name: Render markdown + - name: Render html shell: bash run: ./gradlew doc2html + - name: Render markdown + shell: bash + run: ./gradlew doc2md - name: extract version shell: bash @@ -37,12 +40,15 @@ runs: shell: bash run: | mkdir -p deploy/autodoc/${{ env.VERSION }} + cp build/*.json deploy/autodoc/${{ env.VERSION }}/autodoc.json + cp build/*.md deploy/autodoc/${{ env.VERSION }}/autodoc.md cp build/*.html deploy/autodoc/${{ env.VERSION }}/index.html - name: Render html for stable version shell: bash if: ${{ !endsWith( env.VERSION, '-SNAPSHOT') }} - run: cp deploy/autodoc/${{ env.VERSION }}/index.html deploy/autodoc/index.html + run: | + cp deploy/autodoc/${{ env.VERSION }}/* deploy/autodoc/ - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 diff --git a/.github/workflows/verify-openapi.yml b/.github/workflows/verify-openapi.yml index a8e2406..5a3792f 100644 --- a/.github/workflows/verify-openapi.yml +++ b/.github/workflows/verify-openapi.yml @@ -50,7 +50,7 @@ jobs: fi VERSION=$(cat $JSON_VERSION_FILE | jq '.[] | select(.maturity=="stable" or .maturity==null) | .version' | cut -d '"' -f 2) - ./gradlew -PapiVersion=$VERSION -PapiTitle="${{ matrix.apiGroup }}" -PapiDescription="REST API documentation for the ${{ matrix.apiGroup }}" :mergeApiSpec --input=resources/openapi/yaml/${{ matrix.apiGroup }} --output=${{ matrix.apiGroup }}-new.yaml -q + ./gradlew -PapiVersion=$VERSION -PapiTitle="${{ matrix.apiGroup }}" -PapiDescription="REST API documentation for the ${{ matrix.apiGroup }}" :mergeApiSpec --input=resources/openapi/yaml/${{ matrix.apiGroup }} --output=${{ matrix.apiGroup }}-new.yaml git show origin/gh-pages:openapi/${{ matrix.apiGroup }}/${{ matrix.apiGroup }}.yaml > ${{ matrix.apiGroup }}.yaml