Migrate storybook configuration to 7 #33
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: 'Chromatic' | |
'on': | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
- 'renovate/**' | |
tags-ignore: | |
- '*' | |
jobs: | |
chromatic-deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # get full Git history | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Authenticate GitHub Packages | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${NPM_PKG_TOKEN}" > ~/.npmrc | |
env: | |
NPM_PKG_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install npm packages | |
run: pnpm install | |
- name: Publish to Chromatic | |
if: github.ref != 'refs/heads/main' | |
uses: chromaui/action@v1 | |
with: | |
projectToken: ${{ secrets.CHROMATIC_TOKEN }} | |
- name: Publish new baseline Chromatic | |
if: github.ref == 'refs/heads/main' | |
uses: chromaui/action@v1 | |
with: | |
projectToken: ${{ secrets.CHROMATIC_TOKEN }} | |
autoAcceptChanges: true |