-
-
Notifications
You must be signed in to change notification settings - Fork 163
120 lines (98 loc) · 2.81 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Fighting Design Github Actions
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
# 下载仓库代码 / 校验
- name: Checkout
uses: actions/checkout@v3
# 安装 pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7.17.1
# 安装 node
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'pnpm'
# 安装依赖项
- name: Install
run: pnpm i
# 单元测试
- name: Test
run: pnpm test
# 打包组件
- name: Build components
run: pnpm build
# # 打打包文档,并移动产物到新分支
# - name: Build and Move docs
# run: |
# pnpm build:docs
# mkdir -p docs/docs/.vitepress/dist
# mv -f build_output_directory/* docs/docs/.vitepress/dist/
# git add -A
# git commit -m "Move build artifacts to docs-web branch"
# git push origin docs-web
# 向 Codecov 报告覆盖率
- name: Report coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/docs/.vitepress/dist
# name: Fighting Design Github Actions
# # 当 master 分支 push 代码的时候触发 workflow
# on:
# push:
# branches:
# - master
# 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: 7.17.1
# # 安装 node
# - name: Setup node
# uses: actions/setup-node@v3
# with:
# node-version: '16.x'
# cache: 'pnpm'
# # 安装依赖项
# - name: Install
# run: pnpm i
# # 单元测试
# - name: Test
# run: pnpm test
# # 打包组件
# - name: Build components
# run: pnpm build
# # 打打包文档
# - name: Build docs
# run: pnpm build:docs
# # 向 Codecov 报告覆盖率
# - name: Report coverage to Codecov
# uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/docs/.vitepress/dist