Skip to content

ci: update workflow #11

ci: update workflow

ci: update workflow #11

Workflow file for this run

name: Convert OpenAPI to HTML
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install Redoc CLI
run: npm install -g @redocly/cli
- name: Create docs directory if it doesn't exist
run: mkdir -p docs
- name: Generate HTML from OpenAPI YAML
run: redocly build-docs ./api/latest.json -o ./docs/index.html
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/index.html
git commit -m 'docs(api): generate HTML documentation from OpenAPI spec'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}