1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-16 20:30:11 +01:00
Stirling-PDF/.github/workflows/swagger.yml
Ludy 1af41f8ea5
🔨 add Developer tools/scripts (#828)
* 🔨 add Developer tools

* Update downloader.js

* Update game.js

* Update .pre-commit-config.yaml

* Update sync_versions.yml

* removed: mixed line ending tool

* Update swagger.yml

* Update push-docker.yml

* Update build.yml

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-03-13 22:18:15 +00:00

40 lines
1.1 KiB
YAML

name: Update Swagger
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- ".github/**"
- "**/*.md"
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate Swagger documentation
run: ./gradlew generateOpenApiDocs
- name: Upload Swagger Documentation to SwaggerHub
run: ./gradlew swaggerhubUpload
env:
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}
- name: Set API version as published and default on SwaggerHub
run: |
curl -X PUT -H "Authorization: ${SWAGGERHUB_API_KEY}" "https://api.swaggerhub.com/apis/Frooodle/Stirling-PDF/${{ steps.versionNumber.outputs.versionNumber }}/settings/lifecycle" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"published\":true,\"default\":true}"
env:
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}