Skip to content

Instantly share code, notes, and snippets.

@pi0neerpat
Created July 8, 2021 00:55
Show Gist options
  • Save pi0neerpat/c9d1517eca6a5f51a96f6f095875e67c to your computer and use it in GitHub Desktop.
Save pi0neerpat/c9d1517eca6a5f51a96f6f095875e67c to your computer and use it in GitHub Desktop.
Chromatic + RedwoodJS Github Action
name: Chromatic
on:
push:
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache "node_modules"
uses: actions/cache@v2
with:
path: '**/node_modules'
key: node_modules_${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build Storybook
run: yarn rw storybook --build
- name: Move MSW to public/storybook
run: mv web/public/mockServiceWorker.js web/public/storybook
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
token: ${{ secrets.GITHUB_TOKEN }}
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: web/public/storybook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment