Skip to content

Commit

Permalink
feat: add api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-d committed Dec 7, 2023
1 parent 534c4db commit 8bd3821
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
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: .
23 changes: 23 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Metad Analytics Cloud</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="theme-color" content="#263238" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap" rel="stylesheet">
</head>
<body style="font-family: Lato, 'Noto Serif SC', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';">
<ul>
<li ><a href="./storybook">@metad/ocap-angular</a></li>
<li ><a href="./api/store">@metad/store</a></li>
<li ><a href="./api/core">@metad/ocap-core</a></li>
<li ><a href="./api/xmla">@metad/ocap-xmla</a></li>
<li ><a href="./api/sql">@metad/ocap-sql</a></li>
<li ><a href="./api/echarts">@metad/ocap-echarts</a></li>
<li ><a href="./api/duckdb">@metad/ocap-duckdb</a></li>
</ul>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 3 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ocap-core
# Core for ocap

Core package for ocap project.

Expand All @@ -8,4 +8,5 @@ This package includes all types defination and common logic service class for oc

## 中文

这个包包含了 ocap 项目的所有类型定义和通用逻辑服务类。
这个包包含了 ocap 项目的所有类型定义和通用逻辑服务类。

0 comments on commit 8bd3821

Please sign in to comment.