Skip to content

Commit 2c46567

Browse files
update:gitHub action setup
1 parent 64a923f commit 2c46567

9 files changed

+38
-1
lines changed

.github/workflows/chromatic.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Workflow name
2+
name: "Chromatic Deployment"
3+
4+
# Event for the workflow
5+
on: push
6+
7+
# List of jobs
8+
jobs:
9+
chromatic:
10+
name: "Run Chromatic"
11+
runs-on: ubuntu-latest
12+
# Job steps
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: pnpm/action-setup@v2
18+
with:
19+
version: 8
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
cache: 'pnpm'
24+
- run: pnpm install
25+
#👇 Adds Chromatic as a step in the workflow
26+
- uses: chromaui/action@latest
27+
# Options required for Chromatic's GitHub Action
28+
with:
29+
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/en/deploy/ to obtain it
30+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
31+
token: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"name": "meta-front-end-capstone-assignment",
3-
"author": "Quang Pham",
3+
"author": {
4+
"name": "Quang Pham"
5+
},
46
"private": true,
57
"version": "1.0.0",
68
"type": "module",
@@ -40,6 +42,7 @@
4042
"@types/react": "^18.3.3",
4143
"@types/react-dom": "^18.3.0",
4244
"@vitejs/plugin-react": "^4.3.1",
45+
"chromatic": "^11.11.0",
4346
"eslint": "^9.9.0",
4447
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
4548
"eslint-plugin-react-refresh": "^0.4.9",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)