-
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.
Refactor GitHub Actions workflow for Chromatic integration
- Loading branch information
1 parent
f745bd0
commit 6e8a7ec
Showing
1 changed file
with
15 additions
and
12 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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
# Name of our action | ||
name: 'Chromatic' | ||
# The event that will trigger the action | ||
|
||
on: push | ||
|
||
# What the action will do | ||
jobs: | ||
test: | ||
# The operating system it will run on | ||
chromatic: | ||
name: Run Chromatic | ||
runs-on: ubuntu-latest | ||
# The list of steps that the action will go through | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v1 | ||
# ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI environment. | ||
run: npm ci | ||
- name: Run Chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/design-systems-for-developers/react/en/review/ to obtain it | ||
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
token: ${{ secrets.GH_TOKEN }} |