-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for chromatic * Make another commit * Add chromatic on push * Add fetch depth * Publish comment * Generate previews on pull request * Only publish link on pull requests * Only on push to main * Add permissions * Add more permissions * Add missing permissions * Exit once uploaded
- Loading branch information
1 parent
ddbeaca
commit 1827358
Showing
3 changed files
with
64 additions
and
0 deletions.
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,38 @@ | ||
name: "Chromatic" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
chromatic: | ||
permissions: write-all | ||
name: Run Chromatic | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "21.x" | ||
cache: npm | ||
- run: npm ci | ||
- name: Run Chromatic | ||
id: chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
autoAcceptChanges: "main" | ||
exitOnceUploaded: true | ||
|
||
- name: Publish Storybook Link in the comments | ||
if: github.event_name == 'pull_request' | ||
uses: dannyhw/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
review-url: ${{ steps.chromatic.outputs.url }} | ||
build-url: ${{ steps.chromatic.outputs.buildUrl }} | ||
storybook-url: ${{ steps.chromatic.outputs.storybookUrl }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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