Skip to content

Avoid props drilling for DatasetRepository #2618

Avoid props drilling for DatasetRepository

Avoid props drilling for DatasetRepository #2618

name: 'Chromatic Design System '
# Event for the workflow
on:
pull_request:
push:
branches:
- develop
# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Create .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp .npmrc.example .npmrc
sed -i -e "s#<YOUR_GITHUB_AUTH_TOKEN>#${GITHUB_TOKEN}#g" .npmrc
# Comment out npmjs auth token line if no token provided via secrets
sed -i -e 's#//registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN>#; auth token omitted in CI#g' .npmrc
- name: Install dependencies
# šŸ‘‡ Use clean install for reproducibility
run: npm ci
- name: Build Dataverse Design System
working-directory: packages/design-system
run: npm run build
# šŸ‘‡ Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@latest
env:
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_SLUG: ${{ github.repository }}
# Chromatic GitHub Action options
with:
# šŸ‘‡ Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_DESIGN_SYSTEM_PROJECT_TOKEN }}
workingDir: packages/design-system
⚔