Skip to content

Commit b1d93af

Browse files
authored
ci: add storybook check (#1005)
1 parent f452c0a commit b1d93af

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/workflows/checks.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Install Node.js
2121
uses: actions/setup-node@v2
2222
with:
23-
node-version: 12
23+
node-version: 14
2424
cache: 'pnpm'
2525
- name: Install dependencies
2626
run: pnpm install
@@ -43,7 +43,7 @@ jobs:
4343
- name: Install Node.js
4444
uses: actions/setup-node@v2
4545
with:
46-
node-version: 12
46+
node-version: 14
4747
cache: 'pnpm'
4848
- name: Install dependencies
4949
run: pnpm install
@@ -52,3 +52,23 @@ jobs:
5252
- name: Check typings
5353
if: success()
5454
run: pnpm test:typings
55+
storybook:
56+
runs-on: ubuntu-latest
57+
name: Checking storybook
58+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
59+
steps:
60+
- name: Checkout the repository
61+
uses: actions/checkout@v2
62+
- name: Install pnpm
63+
uses: pnpm/action-setup@v2.0.1
64+
with:
65+
version: 6
66+
- name: Install Node.js
67+
uses: actions/setup-node@v2
68+
with:
69+
node-version: 14
70+
cache: 'pnpm'
71+
- name: Install dependencies
72+
run: pnpm install
73+
- name: Check storybook
74+
run: pnpm build:storybook

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install Node.js
1818
uses: actions/setup-node@v2
1919
with:
20-
node-version: 12
20+
node-version: 14
2121
cache: 'pnpm'
2222
- name: Install dependencies
2323
run: pnpm install

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"emitDeclarations": "tsc --skipLibCheck --emitDeclarationOnly",
3535
"build": "rollup -c & pnpm emitDeclarations",
3636
"start:storybook": "start-storybook -p 6006 --ci",
37+
"build:storybook": "del ./storybook-static; NODE_ENV=production build-storybook",
3738
"test:lint": "eslint 'src/**/*.{ts,tsx}' 'stories/**/*.{ts,tsx}' 'sandboxes/**/*.{ts,tsx}' 'test/**/*.{ts,tsx}'",
3839
"test:unit": "jest -c jest.config.json",
3940
"test:build": "pnpm build",

0 commit comments

Comments
 (0)