-
Notifications
You must be signed in to change notification settings - Fork 9
34 lines (32 loc) · 1.04 KB
/
chromatic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# .github/workflows/chromatic.yml
# Workflow name
name: 'deployment on chromatic'
# Event for the workflow
on:
push:
branches-ignore:
- "master"
- "development"
- "dependabot/**"
jobs:
chromatic-deployment-theme:
runs-on: ubuntu-latest
if: ${{ contains(github.ref, '#') && contains(github.event.head_commit.message, '[chromatic]') }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Get project to be deployed
shell: bash
run: echo "##[set-output name=branch;]$(grep -oP '(?<=#).*?(?=#)' <<< ${GITHUB_REF})"
id: extract_branch
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: "build:chromatic:${{ steps.extract_branch.outputs.branch }}"
exitOnceUploaded: true
exitZeroOnChanges: true