Skip to content

Merge pull request #221 from vsmalladi/develop #4

Merge pull request #221 from vsmalladi/develop

Merge pull request #221 from vsmalladi/develop #4

Workflow file for this run

name: Build OpenAPI docs
on:
- push
# - pull_request
jobs:
docs-build:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 14.x
# Comes with npm 6. For newer Node, encountered: https://github.com/npm/cli/issues/3359
- run: npm install -g @redocly/openapi-cli && npm install -g redoc-cli
- run: npm install -g gh-openapi-docs
- name: Check out repository code
uses: actions/checkout@v4
- run: gh-openapi-docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: .
deploy:
if: github.ref == 'refs/heads/master' # Only run this job on the master branch
runs-on: ubuntu-latest
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 14.x
# Comes with npm 6. For newer Node, encountered: https://github.com/npm/cli/issues/3359
- run: npm install -g @redocly/openapi-cli && npm install -g redoc-cli
- run: npm install -g gh-openapi-docs
- name: Check out repository code
uses: actions/checkout@v4
- run: gh-openapi-docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: . # Folder containing the built documentation
target-folder: docs/index.html # Deploy to docs/index.html if needed
clean: true