Skip to content

Merge pull request #69 from MathieuSoysal/68-bug-wrong-openapi-version #2

Merge pull request #69 from MathieuSoysal/68-bug-wrong-openapi-version

Merge pull request #69 from MathieuSoysal/68-bug-wrong-openapi-version #2

Workflow file for this run

on:
push:
branches: ['master']
paths: ['openapi.yml']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Convert yml to json
run: |
npm install -g @apidevtools/swagger-cli
swagger-cli bundle openapi.yml -t json -o openapi.json
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: openapi.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
clean: false
branch: api
folder: swagger-ui
target-folder: docs