Skip to content

Commit

Permalink
feat: First version of documentation pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jfaldanam committed Jun 18, 2024
1 parent f426ec1 commit 294b478
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Generate and deploy OpenAPI Docs

on:
push:
branches:
- master
- feat/generate-docs

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

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

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev]"
- name: Generate OpenAPI JSON
run: python scripts/generate_openapi.py

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Install Redoc CLI
run: npm install -g redoc-cli

- name: Generate HTML from OpenAPI JSON
run: npx @redocly/cli build-docs openapi.json

- name: Move generated HTML to docs directory
run: mv redoc-static.html docs/index.html

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 294b478

Please sign in to comment.