Skip to content

feat: Add Swagger Spec #3

feat: Add Swagger Spec

feat: Add Swagger Spec #3

Workflow file for this run

name: Merge OpenAPI Specs
on:
push:
branches:
- docs
jobs:
merge-openapi-specs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install redoc-cli
run: npm install -g redoc-cli
- name: Merge OpenAPI specs
run: |
echo "::group::Merging OpenAPI specs"
jq -s '.[0] * .[1]' docs/petstore-api-docs.json docs/user-api-docs.json > docs/merged-api-docs.json
echo "::endgroup::"
- name: Generate Redoc HTML
run: |
mkdir -p public
redoc-cli bundle docs/merged-api-docs.json -o public/index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages