mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-08-23 22:50:22 +02:00
33 lines
881 B
YAML
33 lines
881 B
YAML
name: Update Swagger
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
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: |
|
|
curl -X PUT -H "Authorization: ${SWAGGERHUB_API_KEY}" -H "Content-Type: application/json" -d @./SwaggerDoc.json "https://api.swaggerhub.com/apis/Frooodle/Stirling-PDF/${{ steps.versionNumber.outputs.versionNumber }}?isPrivate=false&force=true"
|
|
env:
|
|
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}
|