fix: chromatic deployment #50
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 Publish' | |
on: | |
push: | |
branches: | |
- project/storybook | |
jobs: | |
ui: | |
name: UI library | |
environment: 'test' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/ui | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Install dependencies on UI library | |
run: yarn install --frozen-lockfile | |
- name: Typecheck | |
run: yarn typecheck | |
- name: Lint CSS | |
run: yarn lint:css | |
- name: Lint JS | |
run: yarn lint:js | |
- name: build UI library | |
run: yarn build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ui-build | |
path: packages/ui/dist | |
chromatic: | |
runs-on: ubuntu-latest | |
needs: [ui] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- run: yarn | |
#👇 Adds Chromatic as a step in the workflow | |
- uses: chromaui/action@v1 | |
# Options required for Chromatic's GitHub Action | |
with: | |
#👇 Chromatic projectToken | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
workingDir: packages/go-ui-storybook |