Skip to content

Visual Test

Visual Test #349

Workflow file for this run

name: Visual Test
on:
schedule:
- cron: '00 23 * * *' # Runs at midnight UTC every day
permissions:
contents: read
jobs:
chromatic:
name: Chromatic
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Check for today commits
id: today
run: |
today=$(date -u +"%Y-%m-%d")
last_commit_date=$(git log -1 --format=%cd --date=short)
if [ "$today" == "$last_commit_date" ]; then
echo "has_commits=true" >> "$GITHUB_OUTPUT"
else
echo "has_commits=false" >> "$GITHUB_OUTPUT"
echo "No commits today. Stopping the workflow."
fi
- name: Initialize Node.js
if: steps.today.outputs.has_commits == 'true'
uses: ./.github/actions/init-node
- name: Publish to Chromatic
if: steps.today.outputs.has_commits == 'true'
uses: chromaui/[email protected]
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build:visual
workingDir: web/
exitZeroOnChanges: true