Skip to content

Commit

Permalink
Merge pull request #888 from catenax-ng/feat/500-publish-swagger-ui-i…
Browse files Browse the repository at this point in the history
…n-docs

feat(impl):[#500] publish swagger ui in github pages
  • Loading branch information
ds-ext-kmassalski authored Apr 23, 2024
2 parents 6581c47 + 3b4ab96 commit 3f5c59f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 28 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/publish-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build API documentation with Maven
run: |
mvn clean package -pl irs-common,irs-models,irs-policy-store,irs-testing,irs-edc-client,irs-registry-client,irs-api -DskipTests --batch-mode
cp irs-api/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
Expand Down Expand Up @@ -112,10 +107,26 @@ jobs:
run: |
mv docs/src/diagram-replacer/assets/ docs/target/generated-docs/assets/
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: docs/src/api/irs-api.yaml

- name: Update documentation on GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.9.3
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"


5 changes: 0 additions & 5 deletions docs/src/docs/api-specification/api-specification.adoc

This file was deleted.

5 changes: 0 additions & 5 deletions docs/src/docs/api-specification/api.adoc

This file was deleted.

10 changes: 0 additions & 10 deletions docs/src/docs/api-specification/index.html

This file was deleted.

4 changes: 2 additions & 2 deletions docs/src/docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
== Administration Guide
xref:administration/administration-guide.adoc[]

== API-Documentation
xref:api-specification/api-specification.adoc[OpenApi specification]
== Swagger-UI
xref:swagger-ui/index.adoc[Swagger-UI]

== Architecture Documentation (arc42)
- xref:arc42/index.adoc[Single chapters]
Expand Down
13 changes: 13 additions & 0 deletions docs/src/docs/swagger-ui/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
= Swagger-UI

== NOTICE

This work is licensed under the https://www.apache.org/licenses/LICENSE-2.0[Apache-2.0].

- SPDX-License-Identifier: Apache-2.0
- SPDX-FileCopyrightText: 2021, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
- SPDX-FileCopyrightText: 2022, 2023 BOSCH AG
- SPDX-FileCopyrightText: 2021, 2022 ZF Friedrichshafen AG
- SPDX-FileCopyrightText: 2022 ISTOS GmbH
- SPDX-FileCopyrightText: 2021, 2023 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/item-relationship-service

0 comments on commit 3f5c59f

Please sign in to comment.