Skip to content

dev-deps: update storybook monorepo to v8.4.5 (patch) #1970

dev-deps: update storybook monorepo to v8.4.5 (patch)

dev-deps: update storybook monorepo to v8.4.5 (patch) #1970

Workflow file for this run

# This GitHub action updates the Chromatic build everytime the Fractal
# documentation or the React UI library is updated.
name: Storybook
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
NODE_ENV: production
FREEZER_TOKEN: ${{ secrets.FREEZER_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
chromatic:
name: Deploying Fractal Storybook to Chromatic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')
name: Do not update Chromatic on Renovate PRs
run: echo "SKIP_CHROMATIC=1" >> $GITHUB_ENV
- if: env.SKIP_CHROMATIC != 1
name: Get changed files from Fractal components library
id: changed-files-specific
uses: tj-actions/changed-files@v45
with:
files: |
packages/fractal/**
package.json
tsconfig.json
yarn.lock
.yarnrc
.yarn/**
.gitignore
scripts/**
.github/workflows/quality.yml
.github/workflows/storybook.yml
- if: env.SKIP_CHROMATIC != 1 && steps.changed-files-specific.outputs.any_changed != 'true'
name: No need to update Chromatic
run: |
echo "There are no changes in Fractal components library."
echo "SKIP_CHROMATIC=1" >> $GITHUB_ENV
- if: env.SKIP_CHROMATIC != 1
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- if: env.SKIP_CHROMATIC != 1
name: Setting up dependencies & workspaces
run: yarn install --immutable --immutable-cache && yarn run -T setup
- if: env.SKIP_CHROMATIC != 1
name: Setting up Git to access Freezer
env:
FREEZER_TOKEN: ${{ secrets.FREEZER_TOKEN }}
run: yarn run setup-freezer
- if: env.SKIP_CHROMATIC != 1 && github.event_name == 'push'
name: Waiting for security to pass
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: Checking Yarn cache's integrity
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- if: env.SKIP_CHROMATIC != 1 && github.event_name == 'push'
name: Waiting for quality to pass
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: Checking code quality
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- if: env.SKIP_CHROMATIC != 1 && github.event_name == 'push'
name: Building and publishing to Chromatic
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_REACT_PROJECT_TOKEN }}
run: |
yarn workspace @snowball-tech/fractal build-chromatic --exit-zero-on-changes --exit-once-uploaded --no-interactive
- if: env.SKIP_CHROMATIC != 1 && github.event_name == 'pull_request'
name: Building and publishing to Chromatic with Snapshot testing
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_REACT_PROJECT_TOKEN }}
run: |
yarn workspace @snowball-tech/fractal build-chromatic --no-interactive
- if: env.SKIP_CHROMATIC != 1 && failure()
uses: actions/upload-artifact@v4
with:
name: Storybook build log
path: ./packages/fractal/build-storybook.log