Skip to content

Add build job with turbo cache to CI #1317

Add build job with turbo cache to CI

Add build job with turbo cache to CI #1317

Workflow file for this run

name: Chromatic
on:
push:
branches:
- main
pull_request:
paths:
- packages/bezier-react/**
jobs:
chromatic-deployment:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
name: Chromatic
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.17.1
cache: yarn
- name: Restore cache
uses: actions/cache@v3
with:
path: |
**/.eslintcache
**/.stylelintcache
**/.jestcache
**/.turbo
node_modules/.cache/turbo
key: ${{ runner.os }}-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-test-
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Publish to Chromatic
uses: chromaui/action@v1
id: chromatic
with:
workingDir: packages/bezier-react
exitZeroOnChanges: true
skip: dependabot/**
projectToken: 06157a6fbe6f
- name: Save PR number and Chromatic build outputs
run: |
mkdir -p ./pr
echo "${{ github.event.pull_request.number }}" > ./pr/prNumber
echo "${{ steps.chromatic.outputs.storybookUrl }}" > ./pr/storybookUrl
echo "${{ steps.chromatic.outputs.buildUrl }}" > ./pr/buildUrl
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: pr
path: pr/