Skip to content

WIP Chromatic workflow update #3

WIP Chromatic workflow update

WIP Chromatic workflow update #3

# .github/workflows/chromatic-deploy.yml
name: Chromatic Deploy
on:
push:
branches:
- master
- staging
- dev
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
changed-files:
runs-on: ubuntu-latest
name: changed-files
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
src/components/**/*
src/pages/**/*
src/layouts/**/*
src/@chakra-ui/**/*
.storybook/**/*
tailwind.config.ts
src/styles/**/*
chromatic:
name: Run visual tests
needs: [changed-files]
if: ${{ needs.changed-files.outputs.any_changed == 'true' }}
uses: ./.github/workflows/chromatic.yml
secrets: inherit