ci(workflows): update Storybook build command to use npx nx for chrom… #4
Workflow file for this run
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
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/**)' |