Skip to content

chore: remove side effect from package json #872

chore: remove side effect from package json

chore: remove side effect from package json #872

Workflow file for this run

# .github/workflows/chromatic.yml
# Workflow name
name: 'Chromatic'
# Event for the workflow
on: push
permissions:
contents: read
pull-requests: write
# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
#πŸ‘‡ Fetches all history so Chromatic can compare against previous builds
fetch-depth: 0
- name: Install dependencies
# πŸ‘‡ Install dependencies with the same package manager used in the project (replace it as needed) e.g. yarn, npm, pnpm
run: yarn
# πŸ‘‡ Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@latest
# Chromatic GitHub Action options
with:
# πŸ‘‡ Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GH_TOKEN }}
exitZeroOnChanges: false
onlyChanged: true # enable TurboSnap https://www.chromatic.com/docs/turbosnap
env:
STORYBOOK_FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
- name: Publish Summary
if: ${{ always() }}
run: echo -e "| Results | |\n| --- | --- |\n| Build Results | ${{steps.chromatic.outputs.buildUrl}} |\n| Storybook Preview | ${{steps.chromatic.outputs.storybookUrl}} |\n| Component Count | ${{steps.chromatic.outputs.componentCount}} |" >> $GITHUB_STEP_SUMMARY