mirror of
https://gh.wpcy.net/https://github.com/syntatis/kubrick.git
synced 2026-04-25 21:46:28 +08:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: chromatic
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
CHROMATIC_PROJECT_TOKEN:
|
|
description: 'Token for uploading Storybook to Chromatic'
|
|
required: true
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
NODE_VERSION: 22
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '7.4'
|
|
|
|
- name: Get Composer cache directory
|
|
id: composer-cache
|
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache Composer dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: ${{ runner.os }}-composer
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
npm ci
|
|
composer install --prefer-dist
|
|
|
|
- name: Publish to Chromatic
|
|
uses: chromaui/action@latest
|
|
with:
|
|
buildScriptName: "storybook:build"
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
exitOnceUploaded: true
|
|
exitZeroOnChanges: true
|