Generate Apps list for docs #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Apps list for docs | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install unzip utility | |
run: sudo apt-get install unzip | |
- name: Download and unzip JSON files | |
run: | | |
curl -L -o media-latest.zip https://w9artifact.blob.core.windows.net/release/websoft9/plugin/media/media-latest.zip | |
unzip media-latest.zip "media/json/product_zh.json" "media/json/product_en.json" "media/json/catalog_zh.json" "media/json/catalog_en.json" -d ./extracted | |
- name: Generate Markdown for product_zh | |
run: | | |
python build/json2md.py ./extracted/media/json/product_zh.json product_zh.md | |
- name: Generate Markdown for product_en | |
run: | | |
python build/json2md.py ./extracted/media/json/product_en.json product_en.md | |
- name: Generate Markdown for allcatalogs.md(zh) | |
run: | | |
python build/gen_allcatalogs.py --json_file ./extracted/media/json/catalog_zh.json --output_file docs/apps/_include/allcatalogs.md | |
- name: Generate Markdown for allcatalogs.md(en) | |
run: | | |
python build/gen_allcatalogs.py --json_file ./extracted/media/json/catalog_en.json --output_file i18n/en/docusaurus-plugin-content-docs/current/apps/_include/allcatalogs.md | |
- name: Generate Markdown for allapps.md(zh) | |
run: | | |
python build/gen_allapps.py --json_file ./extracted/media/json/product_zh.json --output_file docs/apps/_include/allapps.md | |
- name: Generate Markdown for allapps.md(en) | |
run: | | |
python build/gen_allapps.py --json_file ./extracted/media/json/product_en.json --output_file i18n/en/docusaurus-plugin-content-docs/current/apps/_include/allapps.md | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update Product Catalog Markdown |