Skip to content

Commit

Permalink
build: Added GHA generating html via redoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmx committed Oct 17, 2024
1 parent abbe9a5 commit 42d2333
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/redoc_index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Generate Redoc HTML

on:
push:
paths:
- 'openapi.yaml'
branches:
- '**'

jobs:
generate-redoc:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Redoc CLI
run: |
npm install -g redoc-cli
- name: Generate HTML from OpenAPI
run: |
redoc-cli bundle openapi.yaml -o index.html
- name: Commit HTML file
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add index.html
git commit -m "chore: Updated OpenAPI HTML documentation"
git push
echo "🚀 Done!"

0 comments on commit 42d2333

Please sign in to comment.