-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Fighting Design Build Docs | ||
|
||
# 当 master 分支 push 代码 | ||
# 并且 'packages/fighting-design/package.json' 文件修改的时候 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'packages/fighting-design/package.json' | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# 下载仓库代码 / 校验 | ||
- name: Checkout | ||
# actions/checkout@v3 是 github 官方的一个action,用于 clone 该仓库的源码到工作流中 | ||
uses: actions/checkout@v3 | ||
|
||
# 安装 pnpm | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 6 | ||
|
||
# 安装 node pnpm | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
cache: 'pnpm' | ||
|
||
# 安装依赖项 | ||
- name: Install | ||
run: pnpm i | ||
|
||
# 打包文档 | ||
- name: Build docs | ||
run: pnpm build:docs | ||
|
||
# 向 Codecov 报告覆盖率 | ||
- name: Report coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# https://github.com/peaceiris/actions-gh-pages#readme | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/.vitepress/dist |
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