From 3794dc5ee48ae8b225a5077ff83d885f4d54e9d6 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 23 Jul 2024 14:45:47 +0200 Subject: [PATCH 1/4] 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 From 8d629d0cf1801461f869bec3b63284dc2e1bd527 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 23 Jul 2024 14:53:56 +0200 Subject: [PATCH 2/4] chore[XXXX]: updated action --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68233210bf..35e253c19f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha ### Changed - #1070 Convert png to svg according to TRG 1.04 - Diagrams as code / Editable static files - #xxx update IRS chart version from 7.3.1 to 7.4.0 +- XXXX updated publish documentation action ## [13.0.0 - 19.07.2024] @@ -35,7 +36,6 @@ _**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 From db3ef7e114fb0109fa530a9f9d0ca04103ca43fa Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 23 Jul 2024 15:22:43 +0200 Subject: [PATCH 3/4] chore[XXXX]: updated action --- .github/workflows/publish-documentation.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-documentation.yaml b/.github/workflows/publish-documentation.yaml index a8797cc572..e3aa381a4e 100644 --- a/.github/workflows/publish-documentation.yaml +++ b/.github/workflows/publish-documentation.yaml @@ -18,15 +18,13 @@ name: "[BE][FE][DOCUMENTATION] Publish documentation" on: - workflow_dispatch: # Trigger manually + workflow_dispatch: pull_request: - paths: - - 'docs/**' + branches: + - main push: branches: - main - paths: - - 'docs/**' jobs: publish: From 0839b08b248b002c25214be199386361e1ba17c5 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 23 Jul 2024 15:26:13 +0200 Subject: [PATCH 4/4] chore[XXXX]: updated action --- .github/workflows/publish-documentation.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-documentation.yaml b/.github/workflows/publish-documentation.yaml index e3aa381a4e..a8797cc572 100644 --- a/.github/workflows/publish-documentation.yaml +++ b/.github/workflows/publish-documentation.yaml @@ -18,13 +18,15 @@ name: "[BE][FE][DOCUMENTATION] Publish documentation" on: - workflow_dispatch: + workflow_dispatch: # Trigger manually pull_request: - branches: - - main + paths: + - 'docs/**' push: branches: - main + paths: + - 'docs/**' jobs: publish: