Skip to content

Commit

Permalink
Add Chromatic and GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes committed Nov 7, 2023
1 parent f4c9bb5 commit 5bbfa8c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/chromatic.yml
@@ -0,0 +1,28 @@
# Name of our action
name: 'Chromatic'
# The event that will trigger the action
on: push

# What the action will do
jobs:
test:
# The operating system it will run on
runs-on: ubuntu-latest
# The list of steps that the action will go through
steps:
- uses: actions/checkout@v2
with:
#👇 Fetches all history so Chromatic can compare against previous builds
fetch-depth: 0
- uses: actions/setup-node@v3
with:
#👇 Sets the version of Node.js to use
node-version: 16
- run: yarn
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
with:
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/design-systems-for-developers/react/en/review/ to obtain it
projectToken: 2wix88i1ziu
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -42,6 +42,7 @@
"@vitejs/plugin-react": "^3.1.0",
"auto": "^10.3.0",
"boxen": "^5.0.1",
"chromatic": "^7.6.0",
"dedent": "^0.7.0",
"npm-run-all": "^4.1.5",
"polished": "^4.2.2",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -4535,6 +4535,11 @@ chownr@^2.0.0:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==

chromatic@^7.6.0:
version "7.6.0"
resolved "https://registry.yarnpkg.com/chromatic/-/chromatic-7.6.0.tgz#b05cad35d47f6410efa5bca6b35af6fae6e540bc"
integrity sha512-4MwlX8EDMyfQKf1NXTdUhJ2b0EYueByaVrF75pdFaOzHH7n3OhzknmQYbUSegLiFhKvHuvM8nZvf9SCajO+Cow==

ci-info@^3.2.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
Expand Down

0 comments on commit 5bbfa8c

Please sign in to comment.