Skip to content

Commit c9d9a0f

Browse files
author
Erik Ritter
authored
Merge pull request #80 from Developer-DAO/feat/storybook-deployments
Feat/storybook deployments
2 parents b029a86 + 6c14551 commit c9d9a0f

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
test-lint-build:
@@ -29,3 +29,15 @@ jobs:
2929
run: yarn test
3030
- name: Build
3131
run: yarn build
32+
chromatic-deployment:
33+
runs-on: ubuntu-latest
34+
# Job steps
35+
steps:
36+
- uses: actions/checkout@v1
37+
- name: Install dependencies
38+
run: yarn
39+
- name: Publish to Chromatic
40+
uses: chromaui/action@v1
41+
with:
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ yarn-error.log
1717
/coverage
1818

1919
dist
20+
/storybook-static
21+
build-storybook.log

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"test:watch": "yarn test --watch",
2323
"test:coverage": "jest --coverage --colors",
2424
"storybook": "start-storybook -p 9001 -s ./packages/components/src/assets -c .storybook",
25+
"build-storybook": "build-storybook",
26+
"chromatic": "chromatic --exit-zero-on-changes",
2527
"postinstall": "preconstruct dev"
2628
},
2729
"devDependencies": {
@@ -33,6 +35,7 @@
3335
"@preconstruct/cli": "^2.1.5",
3436
"@testing-library/jest-dom": "^5.15.1",
3537
"@testing-library/react": "^12.1.2",
38+
"chromatic": "^6.1.0",
3639
"jest": "^26.6.3",
3740
"msw": "^0.35.0",
3841
"ts-jest": "^26.4.4"

packages/components/src/components/AddressInput/AddressInput.stories.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import { Text } from '@chakra-ui/layout';
77
export default {
88
title: 'Components/AddressInput',
99
component: AddressInput,
10+
parameters: {
11+
// TODO: Fix window.ethereum is undefined breaking chromatic
12+
chromatic: { disableSnapshot: true },
13+
},
1014
};
1115

1216
const WithUseWallet = () => {

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5697,6 +5697,11 @@ chownr@^2.0.0:
56975697
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
56985698
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
56995699

5700+
chromatic@^6.1.0:
5701+
version "6.1.0"
5702+
resolved "https://registry.yarnpkg.com/chromatic/-/chromatic-6.1.0.tgz#0228eba1a01f713a3f5109b7e4f4dbaa4e1a5169"
5703+
integrity sha512-XJT0VIOKYE9RwKTAOcLVpoYqJCU3/+58gOd8Why12sef6WJ7qjeO4c2Vn5ngpM+9A9PwE+y+ULQS25ThSd6WNA==
5704+
57005705
chrome-trace-event@^1.0.2:
57015706
version "1.0.3"
57025707
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac"

0 commit comments

Comments
 (0)