From 8bd3821638429f0d446238483329971fdd73fb86 Mon Sep 17 00:00:00 2001 From: meta-d Date: Thu, 7 Dec 2023 11:31:51 +0800 Subject: [PATCH] feat: add api docs --- .github/workflows/storybook.yml | 19 +++++++++++++------ docs/index.html | 23 +++++++++++++++++++++++ package.json | 2 +- packages/core/README.md | 5 +++-- 4 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 docs/index.html diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 3db123c2b..396f15991 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -13,12 +13,19 @@ jobs: - name: Install and Build 🔧 run: | # Install npm packages and build the Storybook files yarn install - yarn b:sb:ocap-angular + yarn b:docs + mv dist/storybook/angular docs/storybook + mv packages/core/docs docs/api/core + mv packages/store/docs docs/api/store + mv packages/sql/docs docs/api/sql + mv packages/xmla/docs docs/api/xmla + mv packages/echarts/docs docs/api/echarts + mv packages/duckdb/docs docs/api/duckdb - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4.5.0 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages # The branch the action should deploy to. - FOLDER: dist/storybook/angular # The folder that the build-storybook script generates files. - CLEAN: true # Automatically remove deleted files from the deploy branch - TARGET_FOLDER: . \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages # The branch the action should deploy to. + folder: docs # The folder that the build-storybook script generates files. + clean: true # Automatically remove deleted files from the deploy branch + target-folder: . \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..2daa9ad4f --- /dev/null +++ b/docs/index.html @@ -0,0 +1,23 @@ + + + + + Metad Analytics Cloud + + + + + + + + + + diff --git a/package.json b/package.json index 81e56274f..e1b7436d1 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "seed:module": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=7000 yarn ts-node -r tsconfig-paths/register --project apps/api/tsconfig.app.json ./apps/api/src/seed-module.ts --name", "bootstrap": "yarn install", "b:sb:ocap-angular": "yarn nx run ocap-angular:build-storybook", - "b:docs": "concurrently \"yarn --cwd ./packages/store docs\" \"yarn --cwd ./packages/core docs\" \"yarn --cwd ./packages/xmla docs\" \"yarn --cwd ./packages/sql docs\" \"yarn --cwd ./packages/echarts docs\" \"yarn --cwd ./packages/duckdb docs\"" + "b:docs": "concurrently \"yarn --cwd ./packages/store docs\" \"yarn --cwd ./packages/core docs\" \"yarn --cwd ./packages/xmla docs\" \"yarn --cwd ./packages/sql docs\" \"yarn --cwd ./packages/echarts docs\" \"yarn --cwd ./packages/duckdb docs\" \"yarn b:sb:ocap-angular\"" }, "private": true, "dependencies": { diff --git a/packages/core/README.md b/packages/core/README.md index 2e244756a..c8ce48f86 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1,4 +1,4 @@ -# ocap-core +# Core for ocap Core package for ocap project. @@ -8,4 +8,5 @@ This package includes all types defination and common logic service class for oc ## 中文 -这个包包含了 ocap 项目的所有类型定义和通用逻辑服务类。 \ No newline at end of file +这个包包含了 ocap 项目的所有类型定义和通用逻辑服务类。 +