Skip to content

Commit 39147cb

Browse files
authored
chore: consolidate chromatic workflow (#1578)
1 parent c69ffd6 commit 39147cb

File tree

2 files changed

+10
-43
lines changed

2 files changed

+10
-43
lines changed

.github/workflows/chromatic.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@ name: 'Chromatic Deployment'
33
on:
44
push:
55
branches:
6-
- main # Adjust this if your main branch has a different name
6+
- main
77
paths:
8-
- 'src/**' # Only run when files in this directory change
8+
- 'src/**'
99
- 'styles/**'
10-
# pull_request: # No need for PRs for now
11-
# branches:
12-
# - main # Adjust this if your main branch has a different name
10+
pull_request:
11+
types: [labeled]
1312

1413
jobs:
1514
chromatic-deployment:
16-
# To run only on the main repository and not forks
17-
if: github.repository == 'rad-ui/ui'
15+
# Run on main repo pushes or when PR has "deploy-storybook" label
16+
if: github.repository == 'rad-ui/ui' && (github.event_name == 'push' || github.event.label.name == 'deploy-storybook')
1817
runs-on: ubuntu-latest
1918
steps:
2019
- uses: actions/checkout@v4
2120
with:
2221
fetch-depth: 0 # Required for Chromatic to retrieve git history
2322

2423
- name: Use Node.js
25-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2625
with:
27-
node-version: '18' # Adjust this to your project's Node.js version
26+
node-version: '20'
2827

2928
- name: Install dependencies
3029
run: npm ci # Use 'yarn install --frozen-lockfile' if you use Yarn
@@ -34,4 +33,5 @@ jobs:
3433
with:
3534
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
3635
# Optional: Add any additional Chromatic CLI flags here
37-
# For example: --exit-zero-on-changes
36+
# For example: --exit-zero-on-changes
37+

.github/workflows/test-storybook.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)