feat: make chromatic easier to opt-out of, update deps #102
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
name: Chromatic | |
on: push | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
chromatic: | |
name: Run Chromatic | |
if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'chore:') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@v1.3.1 | |
- name: Run Chromatic | |
uses: chromaui/action@latest | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
exitZeroOnChanges: true | |
exitOnceUploaded: true | |
autoAcceptChanges: 'main' | |
onlyChanged: true | |
externals: 'app/styles/tailwind.css' | |
env: | |
SB: 1 | |
API_URL: ${{ secrets.API_URL }} | |
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
MSW_ENABLED: ${{ secrets.MSW_ENABLED }} | |
npm_package_version: ${{ steps.package-version.outputs.current-version}} | |
SESSION_SECRET: ${{ secrets.SESSION_SECRET }} | |
SITE_URL: ${{ secrets.SITE_URL }} |