Skip to content

Baseline deployment on chromatic #362

Baseline deployment on chromatic

Baseline deployment on chromatic #362

Workflow file for this run

# .github/workflows/baseline.yml
# Workflow name
name: 'Baseline deployment on chromatic'
# Event for the workflow
on: create
jobs:
create-subtheme-baseline-master:
runs-on: ubuntu-latest
if: |
github.event.ref_type == 'branch'
&& contains(github.event.ref, '#')
&& contains(github.event.ref, 'chore/release')
steps:
- uses: actions/checkout@v2
with:
ref: master
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.event.ref }})"
id: extract_branch
- name: Publish to Chromatic
run: yarn chromatic --ci --force-rebuild --auto-accept-changes --project-token=${{ secrets.CHROMATIC_PROJECT_TOKEN }} --build-script-name=build:chromatic:${{ steps.extract_branch.outputs.branch }} --branch-name=${{ github.event.ref }}
create-subtheme-baseline-development:
runs-on: ubuntu-latest
if: |
github.event.ref_type == 'branch'
&& contains(github.event.ref, '#')
&& !contains(github.event.ref, 'chore/release')
steps:
- uses: actions/checkout@v2
with:
ref: development
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.event.ref }})"
id: extract_branch
- name: Publish to Chromatic
run: yarn chromatic --ci --force-rebuild --auto-accept-changes --project-token=${{ secrets.CHROMATIC_PROJECT_TOKEN }} --build-script-name=build:chromatic:${{ steps.extract_branch.outputs.branch }} --branch-name=${{ github.event.ref }}