Skip to content

Commit

Permalink
fix: update Docker workflow to use @redocly/cli and add Swagger HTML …
Browse files Browse the repository at this point in the history
…generation
  • Loading branch information
sammrai committed Jan 10, 2025
1 parent 1034cb4 commit 41d8fe7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,27 @@ jobs:
- name: Install Redoc CLI
run: |
npm install -g redoc-cli
npm install -g @redocly/cli
- name: Generate Redoc HTML
run: |
redoc-cli bundle openapi.json --output openapi.html
mv openapi.html pages/
npx @redocly/cli build-docs openapi.json --output redoc.html
mkdir pages
mv redoc.html pages/
- name: Upload Redoc HTML as an artifact
- name: Install Swagger CLI
run: |
npm install -g swagger-cli
- name: Generate Swagger HTML
run: |
swagger-cli bundle openapi.json --outfile swagger.html --type html
mv swagger.html pages/
- name: Upload Redoc and Swagger HTML as artifacts
uses: actions/upload-artifact@v3
with:
name: openapi-redoc
name: openapi-docs
path: pages

- uses: actions/upload-pages-artifact@v1
Expand Down

0 comments on commit 41d8fe7

Please sign in to comment.