Merge branch 'main' into DEV-5251-add-authed-endpoint-s-to-create-con… #6418
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/chromatic.yml | |
# Workflow name | |
name: "Chromatic" | |
# Event for the workflow | |
on: | |
push: | |
branches-ignore: | |
- demo | |
- "dependabot/**" | |
- develop | |
- staging | |
- test | |
# List of jobs | |
jobs: | |
# Only run if SPA code has changed | |
check-changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
spa: ${{ steps.filter.outputs.spa }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
spa: | |
- 'spa/**' | |
# Copied from https://www.chromatic.com/docs/github-actions | |
chromatic-deployment: | |
needs: check-changes | |
if: ${{ needs['check-changes'].outputs.spa == 'true' }} | |
# Operating System | |
runs-on: ubuntu-latest | |
# Job steps | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: cd spa && npm ci | |
# 👇 Adds Chromatic as a step in the workflow | |
- name: Publish to Chromatic | |
uses: chromaui/action@latest | |
# Chromatic GitHub Action options | |
with: | |
# Use TurboSnap | |
# https://www.chromatic.com/docs/turbosnap | |
onlyChanged: true | |
# See https://github.com/chromaui/chromatic-cli/issues/975 | |
# Until this issue, only `workingDir` was needed | |
storybookBaseDir: "spa" | |
workingDir: "spa" | |
# 👇 Chromatic projectToken, refer to the manage page to obtain it. | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |