Skip to content

Commit

Permalink
feat: chromatic 배포
Browse files Browse the repository at this point in the history
  • Loading branch information
imddoy committed Jul 5, 2024
1 parent fbd35bb commit b1bc72f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Workflow name
name: "Chromatic Deployment"

# Event for the workflow
on: push

# List of jobs
jobs:
test:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v2 # Update to the latest version of checkout action
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2 # Example of using a different action
with:
node-version: 16
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- run: yarn
- name: Run Chromatic
uses: chromaui/action@v1 # Update to the latest version of Chromatic action
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: comment PR
uses: thollander/actions-comment-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: "🚀storybook: ${{ steps.chromatic.outputs.storybookUrl }}"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@vitejs/plugin-react-swc": "^3.5.0",
"@yarnpkg/pnpify": "^4.1.0",
"@yarnpkg/sdks": "^3.1.3",
"chromatic": "^11.5.4",
"eslint": "9.x",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5295,6 +5295,7 @@ __metadata:
"@vitejs/plugin-react-swc": "npm:^3.5.0"
"@yarnpkg/pnpify": "npm:^4.1.0"
"@yarnpkg/sdks": "npm:^3.1.3"
chromatic: "npm:^11.5.4"
eslint: "npm:9.x"
eslint-config-prettier: "npm:^9.1.0"
eslint-config-react-app: "npm:^7.0.1"
Expand Down Expand Up @@ -5676,7 +5677,7 @@ __metadata:
languageName: node
linkType: hard

"chromatic@npm:^11.4.0":
"chromatic@npm:^11.4.0, chromatic@npm:^11.5.4":
version: 11.5.4
resolution: "chromatic@npm:11.5.4"
peerDependencies:
Expand Down

0 comments on commit b1bc72f

Please sign in to comment.