mirror of
https://github.com/apache/superset.git
synced 2024-09-19 12:09:42 -04:00
56 lines
2.1 KiB
YAML
56 lines
2.1 KiB
YAML
|
# .github/workflows/chromatic.yml
|
||
|
# seee https://www.chromatic.com/docs/github-actions
|
||
|
#
|
||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||
|
# contributor license agreements. See the NOTICE file distributed with
|
||
|
# this work for additional information regarding copyright ownership.
|
||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||
|
# (the "License"); you may not use this file except in compliance with
|
||
|
# the License. You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
|
#
|
||
|
|
||
|
# Workflow name
|
||
|
name: 'Chromatic Storybook Master'
|
||
|
|
||
|
# Event for the workflow
|
||
|
# Only run if changes were made in superset-frontend folder of repo on merge to Master
|
||
|
on:
|
||
|
# This will trigger when a branch merges to master when the PR has changes in the frontend folder updating the chromatic baseline
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
paths:
|
||
|
- "superset-frontend/**"
|
||
|
|
||
|
# List of jobs
|
||
|
jobs:
|
||
|
chromatic-deployment:
|
||
|
# Operating System
|
||
|
runs-on: ubuntu-latest
|
||
|
# Job steps
|
||
|
steps:
|
||
|
- uses: actions/checkout@v1
|
||
|
- name: Install dependencies
|
||
|
run: npm ci
|
||
|
working-directory: superset-frontend
|
||
|
# 👇 Build and publish Storybook to Chromatic
|
||
|
- name: Build and publish Storybook to Chromatic
|
||
|
id: chromatic-master
|
||
|
uses: chromaui/action@v1
|
||
|
# Required options for the Chromatic GitHub Action
|
||
|
with:
|
||
|
# 👇 Location of package.json from root of mono-repo
|
||
|
workingDir: superset-frontend
|
||
|
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
|
||
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||
|
exitZeroOnChanges: true # 👈 Option to prevent the workflow from failing
|
||
|
autoAcceptChanges: true # 👈 Option to accept all changes when merging to master
|