Update Blog Post “hello” #630
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' | |
# Event for the workflow | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: ['review_requested', 'labeled'] | |
# List of jobs | |
jobs: | |
chromatic-deployment: | |
# Operating System | |
runs-on: ubuntu-latest | |
# Only run the Chromatic workflow if a maintainer has labeled the PR as 'safe to test'. | |
# if: contains(github.event.pull_request.labels.*.name, 'safe to test') | |
# Job steps | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# enables use to use the cache in actions/setup-node | |
- uses: pnpm/action-setup@v4.0.0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
# 👇 Adds Chromatic as a step in the workflow | |
- name: Publish to Chromatic | |
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 }} | |
# Enables TurboSnap so we can save our quota: https://www.chromatic.com/docs/turbosnap | |
onlyChanged: true |