A composite Github Action to generate code, OpenAPI and AsyncAPI documentation and to deploy it on Github Pages.
Choose the types of documentation you want to generate by putting true on this input parameters:
- should-generate-code-documentation
- should-generate-openapi-documentaion
- should-generate-asyncapi-documentaion
For every selected type specify the command, input file and destination folder or use the default values:
- code-documentation-generation-commanddefault './gradlew dokkaHtml'
- code-documentation-dst-folderdefault 'build/dokka/html'
- code-documentation-site-folderdefault 'documentation/code-doc'
- openapi-documentation-input-filedefault 'docs/openapi/openapi.yml'
- openapi-documentation-dst-folderdefault 'documentation/openapi-doc/'
- asyncapi-documentation-input-filedefault 'docs/asyncapi/asyncapi.yml'
- asyncapi-documentation-dst-folderdefault ''documentation/asyncapi-doc/'
Finally, provide the GITHUB_TOKEN to allow the action to push on gh-pages branch:
- github-token
An example of how to use the action with all types of documentations and inputs:
jobs:
  documentation:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - uses: SmartOperatingBlock/[email protected]
        with:
          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-openapi-documentation: true
          openapi-documentation-input-file: 'docs/openapi/openapi.yml'
          openapi-documentation-dst-folder: 'documentation/openapi-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 }}The action is released under the MIT License.