Skip to content

Commit

Permalink
ci(documentation): add documentation deploy job
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGiulianelli committed Feb 12, 2025
1 parent 2b7aaa2 commit e6c83b7
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,39 @@ jobs:
container-registry-username: ${{ github.actor }}
container-registry-password: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}


documentation-deploy:
needs:
- release-and-delivery
permissions:
contents: write
runs-on: ubuntu-latest
if: needs.release-and-delivery.outputs.release-status == 'released'
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Generate and deploy documentation
uses: AndreaGiulianelli/documentation-ghp-action@1.1.1
with:
should-generate-code-documentation: true
code-documentation-generation-command: ./gradlew javadoc
code-documentation-dst-folder: './build/docs/javadoc'
code-documentation-site-folder: 'documentation/code-doc'
should-generate-openapi-documentation: true
openapi-documentation-input-file: 'docs/rest-api/rest-api-docs.yml'
openapi-documentation-dst-folder: 'documentation/openapi-doc'
github-token: ${{ secrets.GITHUB_TOKEN }}

success:
runs-on: ubuntu-latest
needs:
- validation
- build
- release-and-delivery
- documentation-deploy
if: >-
always() && (
contains(join(needs.*.result, ','), 'failure')
Expand Down

0 comments on commit e6c83b7

Please sign in to comment.