forked from Stirling-Tools/Stirling-PDF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split pages support n function and other stuff
- Loading branch information
Showing
16 changed files
with
2,682 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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: Get version number | ||
id: versionNumber | ||
run: echo "::set-output name=versionNumber::$(./gradlew printVersion --quiet | tail -1)" | ||
|
||
- name: Commit and push if it changed | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add -A | ||
git diff --quiet && git diff --staged --quiet || git commit -m "Updated Swagger documentation" | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | ||
git push | ||
- name: Upload Swagger Documentation to SwaggerHub | ||
run: | | ||
curl -X POST -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ local.properties | |
.recommenders | ||
.classpath | ||
.project | ||
version.properties | ||
|
||
# Gradle | ||
.gradle | ||
|
Oops, something went wrong.