Build OpenAPI Docs #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build OpenAPI Docs | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- practicals/button/spec.yml | |
- studies/chatterbox/spec.yml | |
jobs: | |
build-cloud: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Generate Button API | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: html2 | |
openapi-file: ./practicals/button/spec.yml | |
command-args: --output ./dist/api/button --template-dir ./assessment/cloud/docs-template | |
- name: Generate Chatterbox API | |
uses: openapi-generators/openapitools-generator-action@v1 | |
with: | |
generator: html2 | |
openapi-file: ./studies/chatterbox/spec.yml | |
command-args: --output ./dist/api/chatterbox --template-dir ./assessment/cloud/docs-template | |
- name: Upload APIs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apis | |
path: | | |
./dist/api/** | |