-
-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added storybook configruation for publishing on chromatic #3548
base: master
Are you sure you want to change the base?
Changes from all commits
5584d52
a3c6bc2
8d7b093
876e743
a7a78a2
1729e7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Workflow name | ||
name: 'Chromatic Publish' | ||
|
||
# Event for the workflow | ||
on: push | ||
|
||
# List of jobs | ||
jobs: | ||
test: | ||
# Operating System | ||
runs-on: ubuntu-latest | ||
# Job steps | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use the existing node version present in the |
||
cache: 'npm' | ||
- run: npm ci | ||
#👇 Adds Chromatic as a step in the workflow | ||
- uses: chromaui/action@latest | ||
# Options required for Chromatic's GitHub Action | ||
with: | ||
#👇 Chromatic projectToken, | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to create a custom project using asyncapi account in chromatic? |
||
token: ${{ secrets.GITHUB_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,8 @@ | |
"test:md": "node scripts/markdown/check-markdown.js", | ||
"test:editlinks": "node scripts/markdown/check-edit-links.js", | ||
"dev:storybook": "storybook dev -p 6006", | ||
"build:storybook": "storybook build" | ||
"build:storybook": "storybook build", | ||
"chromatic": "npx chromatic --build-script-name=build:storybook" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -39,7 +40,10 @@ | |
"homepage", | ||
"site" | ||
], | ||
"author": "Fran Mendez <[email protected]>", | ||
"author": { | ||
"name": "Fran Mendez", | ||
"email": "[email protected]" | ||
}, | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/asyncapi/website/issues" | ||
|
@@ -139,6 +143,7 @@ | |
"@types/react-youtube-embed": "^1.0.4", | ||
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", | ||
"chromatic": "^11.22.0", | ||
"dedent": "^1.5.1", | ||
"eslint": "^8", | ||
"eslint-config-airbnb-typescript": "^17.1.0", | ||
|
@@ -161,4 +166,4 @@ | |
"remark-mdx": "^3.0.1", | ||
"storybook": "^8.2.4" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on push of which branch? Kindly mention it out.
Also, do we need chromatic URL for PR deploys as well?