Skip to content

Commit

Permalink
feat: change action to generate and deploy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Feb 16, 2023
1 parent 0be59a5 commit 14ae279
Showing 1 changed file with 10 additions and 41 deletions.
51 changes: 10 additions & 41 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,54 +115,24 @@ jobs:
needs:
- release
runs-on: ubuntu-latest
# Update documentation only when there is a new release
if: needs.release.outputs.release-status == 'released'
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Generate Documentation
run: ./gradlew dokkaHtml
- name: Deploy documentation on GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Generate and deploy documenation
uses: SmartOperatingBlock/documentation-ghp-action@1.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: ./build/dokka/html
destination_dir: kdoc
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'docs: update project documentation'

async-api-deploy:
needs:
- release
runs-on: ubuntu-latest
if: needs.release.outputs.release-status == 'released'
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Generating HTML from AsyncAPI document
uses: docker://asyncapi/github-action-for-generator:2.1.11
with:
template: '@asyncapi/html-template@0.9.0'
filepath: ./docs/async-api/async-api.yml
output: asyncapy-doc
- name: Deploy AyncAPI documentation on GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: asyncapi-doc
destination_dir: asyncapi
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'docs: update asyncapi documentation'
should-generate-code-documentation: true
code-documentation-generation-command: ./gradlew dokkaHtml
code-documentation-dst-folder: './build/dokka/html'
code-documentation-site-folder: 'documentation/code-doc'
should-generate-asyncapi-documentation: true
asyncapi-documentation-input-file: 'docs/asyncapi/asyncapi.yml'
asyncapi-documentation-dst-folder: 'documentation/asyncapi-doc'
github-token: ${{ secrets.GITHUB_TOKEN }}

success:
runs-on: ubuntu-22.04
Expand All @@ -171,7 +141,6 @@ jobs:
- release
- docker-image-delivery
- documentation-deploy
- async-api-deploy
if: >-
always() && (
contains(join(needs.*.result, ','), 'failure')
Expand Down

0 comments on commit 14ae279

Please # to comment.