From 3794dc5ee48ae8b225a5077ff83d885f4d54e9d6 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 23 Jul 2024 14:45:47 +0200 Subject: [PATCH] chore[XXXX]: updated action --- .github/workflows/publish-documentation.yaml | 29 +++++++++++++++----- CHANGELOG.md | 2 +- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-documentation.yaml b/.github/workflows/publish-documentation.yaml index 5970bfe6e0..a8797cc572 100644 --- a/.github/workflows/publish-documentation.yaml +++ b/.github/workflows/publish-documentation.yaml @@ -19,9 +19,14 @@ name: "[BE][FE][DOCUMENTATION] Publish documentation" on: workflow_dispatch: # Trigger manually + pull_request: + paths: + - 'docs/**' push: branches: - main + paths: + - 'docs/**' jobs: publish: @@ -58,11 +63,6 @@ jobs: restore-keys: ${{ runner.os }}-m2 - - name: Build API documentation with Maven - run: | - mvn clean package -pl tx-backend,tx-models -DskipTests --batch-mode - cp tx-backend/target/generated-sources/openapi/index.html docs/src/docs/api-specification/index.html - - name: Build with Maven env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any @@ -127,9 +127,24 @@ jobs: run: | mv docs/src/diagram-replacer/assets/ docs/target/generated-docs/assets/ - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v4.0.0 + - name: Generate Swagger UI + uses: Legion2/swagger-ui-action@v1 + with: + output: swagger-ui + spec-file: docs/api/traceability-foss-backend.json + + - name: Update documentation on GitHub Pages + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: "./docs/target/generated-docs" destination_dir: "docs" + + - name: Deploy Swagger UI to GitHub Pages + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: "swagger-ui" + destination_dir: "docs/swagger-ui" diff --git a/CHANGELOG.md b/CHANGELOG.md index 844fd01e13..68233210bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha - #941 made the naming for quality notifications consistent throughout the FE app - #1190 store accepted policies in catalog offers on startup - #941 updated labels from QualityTopic to QualityNotification - +- XXXX updated publish documentation action ### Known knowns - #786 Implemented short term solution for securing EDC Callback APIs - #1190 CatalogOffers are not able to provide OR constraints therefore notifications are not processed correctly on wrong policy