feat: added docs to provide custom metadata for reward links and even… #19
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 Specs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- docs/** | |
workflow_dispatch: | |
concurrency: | |
group: publish_openapi_specs | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Upload spec-file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: spec-file | |
path: docs/openapi.yaml | |
- name: Download spec-file | |
uses: actions/download-artifact@v4 | |
with: | |
name: spec-file | |
- name: Generate Swagger UI | |
uses: Legion2/swagger-ui-action@v1 | |
with: | |
output: swagger-ui | |
spec-file: openapi.yaml | |
# the gh pages are setup to build and deploy on push to the 'gh-pages' branch | |
- name: Push to gh-pages branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: swagger-ui |