Skip to content

Commit

Permalink
ci: run redocly-cli directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucky3028 committed Dec 26, 2022
1 parent cc1fd22 commit b9e1d36
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
8 changes: 8 additions & 0 deletions .github/actions/install-redocly-cli/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: install-redocly-cli
description: Install redocly-cli
runs:
using: composite
steps:
- name: Install redocly-cli
run: npm install -g @redocly/cli
shell: bash
12 changes: 0 additions & 12 deletions .github/actions/redocly-cli/action.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/lint-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint
uses: ./.github/actions/redocly-cli
with:
command-args: lint /spec/schema/openapi.yml
- name: Install redocly-cli
uses: ./.github/actions/install-redocly-cli
- name: Lint OpenAPI yml
run: lint ./schema/openapi.yml
lint-examples:
name: Lint examples of OpenAPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install redocly-cli
uses: ./.github/actions/install-redocly-cli
- name: Bundle OpenAPI yml
uses: ./.github/actions/redocly-cli
with:
command-args: bundle /spec/schema/openapi.yml -o /spec/bundled-openapi.yml
- name: Install a lib
run: bundle ./schema/openapi.yml -o ./schema/bundled-openapi.yml
- name: Install openapi-examples-validator
run: npm install -g openapi-examples-validator
- name: Lint examples
run: openapi-examples-validator ./bundled-openapi.yml
8 changes: 4 additions & 4 deletions .github/workflows/pub-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- lint
steps:
- uses: actions/checkout@v3
- name: Bundle
uses: ./.github/actions/redocly-cli
with:
command-args: build-docs /spec/schema/openapi.yml -o /spec/docs/index.html -t /spec/.github/template.hbs
- name: Install redocly-cli
uses: ./.github/actions/install-redocly-cli
- name: Build docs
run: build-docs ./schema/openapi.yml -o ./docs/index.html -t ./.github/template.hbs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down

0 comments on commit b9e1d36

Please sign in to comment.