-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add build and publish OpenAPI UI workflow (#261)
# Problem OpenAPI specs need to be published in the mono-repo. Closes #260 # Solution - Updated github workflows to publish the OpenAPI spec for each service ## Steps to Verify: 1. Verify that the docs are published correctly on github pages. 2. The link tree: https://amplicalabs.github.io/gateway/ ```bash ├── account │ ├── index.html (OpenAPI spec) ├── content-watcher │ ├── index.html (OpenAPI spec) ├── content-publishing │ ├── index.html (OpenAPI spec) ├── graph │ ├── index.html (OpenAPI spec) ├── index.html (mdbook) ```
- Loading branch information
1 parent
0dbd4a9
commit e3f4b72
Showing
9 changed files
with
129 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build and Publish OpenAPI UI | ||
description: "Build and publish OpenAPI UI for a service" | ||
|
||
inputs: | ||
service: | ||
description: "The name of the service to build OpenAPI UI for" | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} | ||
|
||
- name: Generate Swagger Metadata | ||
run: npm run build:metadata | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} | ||
|
||
- name: Generate OpenAPI/Swagger JSON | ||
run: npm run build:swagger | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} | ||
|
||
- name: Generate OpenAPI/Swagger UI | ||
run: npm run generate-swagger-ui | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} | ||
|
||
- name: Copy OpenAPI Spec (index.html) to root docs directory | ||
run: cp ./services/${{ inputs.service }}/docs/index.html ./docs/${{ inputs.service }}/ | ||
shell: bash |
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
Empty file.
Empty file.
Empty file.
Empty file.
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
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
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