Skip to content

Commit

Permalink
feat: added publish docs gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyxdd committed May 10, 2024
1 parent 62df868 commit 59d9bb4
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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

0 comments on commit 59d9bb4

Please sign in to comment.