Skip to content

Commit

Permalink
chore(ci): using redocly/cli instead of redoc-cli
Browse files Browse the repository at this point in the history
Signed-off-by: Swilder-M <i@codming.com>
  • Loading branch information
Swilder-M committed Oct 23, 2024
1 parent 9046f8c commit 14cfb26
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,23 @@ jobs:
if: ${{ matrix.version != 'latest' }}
run: |
cd frontend
yarn global add redoc-cli
npm i -g @redocly/cli@latest
LANGS=(zh en)
for lang in "${LANGS[@]}"; do
redoc-cli bundle redoc/ce-${lang}.json -t redoc/template-emqx.hbs \
--output docs/.vitepress/dist/${lang}/emqx/${VERSION}/admin/api-docs.html \
--options.theme.colors.primary.main=#5e4eff \
--options.theme.typography.headings.fontFamily='Roboto, sans-serif' \
--options.hide-hostname --templateOptions.title "EMQX ${VERSION} API Documentation" \
redocly build-docs redoc/ce-${lang}.json -t redoc/template-emqx.hbs -o docs/.vitepress/dist/${lang}/emqx/${VERSION}/admin/api-docs.html \
--config=redoc/redocly.yaml \
--templateOptions.title "EMQX ${VERSION} API Documentation" \
--templateOptions.description "EMQX ${VERSION} API Documentation" \
--templateOptions.version "${VERSION}" \
--templateOptions.headerTitle 'EMQX ${VERSION} Docs' \
$(if [ "${lang}" == "zh" ]; then echo "--templateOptions.langZH \"zh\""; fi)
redoc-cli bundle redoc/ee-${lang}.json -t redoc/template-emqx-enterprise.hbs \
--output docs/.vitepress/dist/${lang}/enterprise/${VERSION}/admin/api-docs.html \
--options.theme.colors.primary.main=#5e4eff \
--options.theme.typography.headings.fontFamily='Roboto, sans-serif' \
--options.hide-hostname --templateOptions.title "EMQX Enterprise ${VERSION} API Documentation" \
redocly build-docs redoc/ee-${lang}.json -t template-emqx-enterprise.hbs -o docs/.vitepress/dist/${lang}/enterprise/${VERSION}/admin/api-docs.html \
--config=redoc/redocly.yaml \
--templateOptions.title "EMQX Enterprise ${VERSION} API Documentation" \
--templateOptions.description "EMQX Enterprise ${VERSION} API Documentation" \
--templateOptions.version "${VERSION}" \
--templateOptions.headerTitle 'EMQX Enterprise ${VERSION} Docs' \
$(if [ "${lang}" == "zh" ]; then echo "--templateOptions.langZH \"zh\""; fi)
done
Expand Down

0 comments on commit 14cfb26

Please sign in to comment.