-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add storybook deployment to chromatic
- Loading branch information
1 parent
a400b06
commit c430b93
Showing
4 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: 'Storybook Publish' | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
storybook-deployment: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'package.json' | ||
cache: 'npm' | ||
|
||
- uses: nrwl/nx-set-shas@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
- name: Restore nx cache | ||
id: nxcache | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules/.cache/nx | ||
key: ${{ runner.os }}-nxcache-${{ hashFiles('package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-nxcache- | ||
- name: build storybook | ||
run: nx run sketch:build-storybook | ||
|
||
- name: Publish to Chromatic | ||
# see https://github.com/chromaui/action/tags for versions | ||
uses: chromaui/[email protected] | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
storybookBuildDir: ./dist/storybook/sketch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"projectId": "Project:661d194a3f6d14d86c328554", | ||
"autoAcceptChanges": "main", | ||
"exitOnceUploaded": true, | ||
"externals": ["public/**"], | ||
"onlyChanged": true, | ||
"storybookBuildDir": "dist/storybook/sketch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters