mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
- Remove pnpm-specific files (pnpm-lock.yaml, pnpm-workspace.yaml) - Update package.json scripts to use npm instead of pnpm - Add npm workspaces configuration - Update all GitHub workflow files to use npm - Update documentation to reference npm commands - Generate package-lock.json for npm dependency management
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: 'Chromatic'
|
|
|
|
# - [Automate Chromatic with GitHub Actions • Chromatic docs]( https://www.chromatic.com/docs/github-actions/ )
|
|
|
|
on:
|
|
workflow_dispatch: # Allow manual triggering
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
chromatic-deployment:
|
|
runs-on: ubuntu-latest
|
|
# Only run for PRs from version-bump-* branches or manual triggers
|
|
if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'version-bump-')
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Required for Chromatic baseline
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
|
|
- name: Cache tool outputs
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
.cache
|
|
storybook-static
|
|
tsconfig.tsbuildinfo
|
|
key: storybook-cache-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('src/**/*.{ts,vue,js}', '*.config.*', '.storybook/**/*') }}
|
|
restore-keys: |
|
|
storybook-cache-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-
|
|
storybook-cache-${{ runner.os }}-
|
|
storybook-tools-cache-${{ runner.os }}-
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build Storybook and run Chromatic
|
|
id: chromatic
|
|
uses: chromaui/action@latest
|
|
with:
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
buildScriptName: build-storybook
|
|
autoAcceptChanges: 'main' # Auto-accept changes on main branch
|
|
exitOnceUploaded: true # Don't wait for UI tests to complete
|
|
|