chore: fix title text #2683
Workflow file for this run
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
# Workflow name | |
name: "Chromatic" | |
# Event for the workflow | |
on: push | |
env: | |
# Required for the chromatic action | |
REACT_APP_BACKEND_URL: "https://cms-api.isomer.gov.sg/v1" | |
# List of jobs | |
jobs: | |
chromatic-deployment: | |
# Operating System | |
runs-on: ubuntu-latest | |
# Only run if the user is not a bot and there are changes | |
if: ${{ !endsWith(github.actor , 'bot') }} | |
environment: staging | |
# Job steps | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # 👈 Required to retrieve git history | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
frontend: | |
- 'src/components/**' | |
- 'src/layouts/**' | |
- 'src/theme/**' | |
- 'src/styles/**' | |
# This extra step is not in the original chromatic workflow. | |
# This is to pin the version of node (18.x) used. | |
- name: Setup Node.js | |
if: ${{ steps.filter.outputs.frontend == 'true' }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
cache: "npm" | |
- name: Install dependencies | |
if: ${{ steps.filter.outputs.frontend == 'true' }} | |
run: npm ci | |
# 👇 Adds Chromatic as a step in the workflow | |
- name: Publish to Chromatic | |
if: ${{ steps.filter.outputs.frontend == 'true' }} | |
uses: chromaui/action@v1 | |
# Chromatic GitHub Action options | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# 👇 Chromatic projectToken, refer to the manage page to obtain it. | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
onlyChanged: true |