Skip to content

ci(workflows): update Storybook build command to use npx nx for chrom… #4

ci(workflows): update Storybook build command to use npx nx for chrom…

ci(workflows): update Storybook build command to use npx nx for chrom… #4

name: Publish vctrl/viewer Storybook to Chromatic
#exclude dependabot and renovate branches
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-chromatic
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
chromatic:
name: Chromatic
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 20
- name: 📥 Install deps
run: npm install
- name: Build Storybook
run: npx nx build-storybook vctrl/viewer
- name: ⚡ Run chromatic
uses: chromaui/action@latest
# Chromatic GitHub Action options
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_1 }}
workingDir: packages/viewer
autoAcceptChanges: 'main'
exitZeroOnChanges: true
exitOnceUploaded: true
onlyChanged: true
skip: '@(renovate/**|dependabot/**)'