otahirs changed API #13
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
name: Publish OpenAPI docs | |
run-name: ${{ github.actor }} changed API | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'klabis-api-spec.yaml' | |
jobs: | |
publish-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Generate Swagger UI | |
uses: Legion2/swagger-ui-action@v1 | |
with: | |
output: swagger-ui | |
spec-file: klabis-api-spec.yaml | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 6d3b45135e45036d3f059ce628a4e3f2 | |
projectName: klabis-api-docs | |
directory: swagger-ui | |
# Optional: Enable this if you want to have GitHub Deployments triggered | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |