Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(rest): added redoc docs for rest gateway #1860

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,25 @@ jobs:
cd schema
jina export-api --yaml-path "$JINA_VERSION.yml" master.yml --json-path "$JINA_VERSION.json" master.json master
python -c "from daemon import _write_openapi_schema; _write_openapi_schema()"
python ../scripts/get-gateway-openapi.py
cd -
- name: redoc-cli-jinad
uses: seeebiii/redoc-cli-github-action@v10
with:
args: 'bundle schema/daemon.json -o jinad.html'
- name: redoc-cli-gateway
uses: seeebiii/redoc-cli-github-action@v10
with:
args: 'bundle schema/gateway.json -o rest.html'
- name: push-to-api-repo
run: |
mkdir -p schema/daemon/
cp jinad.html schema/daemon/master.html
rm schema/daemon.json
rm -rf schema/jinad
mkdir -p schema/rest/
cp rest.html schema/rest/master.html
rm schema/gateway.json
cd schema
git config --local user.email "dev-bot@jina.ai"
git config --local user.name "Jina Dev Bot"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,27 @@ jobs:
cd schema
jina export-api --yaml-path "$JINA_VERSION.yml" latest.yml --json-path "$JINA_VERSION.json" latest.json latest
python -c "from daemon import _write_openapi_schema; _write_openapi_schema()"
python ../scripts/get-gateway-openapi.py
cd -
- name: redoc-cli-jinad
uses: seeebiii/redoc-cli-github-action@v10
with:
args: 'bundle schema/daemon.json -o jinad.html'
- name: redoc-cli-gateway
uses: seeebiii/redoc-cli-github-action@v10
with:
args: 'bundle schema/gateway.json -o rest.html'
- name: push-to-api-repo
run: |
mkdir -p schema/daemon/
cp jinad.html schema/daemon/index.html
cp jinad.html schema/daemon/${{env.JINA_VERSION}}.html
rm schema/daemon.json
rm -rf schema/jinad
mkdir -p schema/rest/
cp rest.html schema/rest/index.html
cp rest.html schema/rest/${{env.JINA_VERSION}}.html
rm schema/gateway.json
cd schema
git config --local user.email "dev-bot@jina.ai"
git config --local user.name "Jina Dev Bot"
Expand Down