Skip to content

Only publish link on pull requests #6

Only publish link on pull requests

Only publish link on pull requests #6

Workflow file for this run

name: "Chromatic"
on:
pull_request:
push:
jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "21.x"
cache: npm
- run: npm ci
- name: Run Chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: "main"
- name: Publish Storybook Link in the comments
if: github.event_name == 'pull_request'
uses: dannyhw/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
review-url: ${{ steps.chromatic.outputs.url }}
build-url: ${{ steps.chromatic.outputs.buildUrl }}
storybook-url: ${{ steps.chromatic.outputs.storybookUrl }}