Skip to content

test: ci/cd cache test #11

test: ci/cd cache test

test: ci/cd cache test #11

Workflow file for this run

name: 'Chromatic'
on:
pull_request:
branches:
- main
types: [opened, reopened]
push:
branches:
- main
- build/chromatic
jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store
- name: Install dependencies
run: pnpm install -no-frozen-lockfile
working-directory: docs/storybook
- name: Environment Variables
run: |
echo "CHROMATIC_PROJECT_TOKEN=${{ secrets.CHROMATIC_PROJECT_TOKEN }}" >> .env
cat .env
working-directory: docs/storybook
- name: Deploy Storybook
run: pnpm run deploy:storybook
# - name: Publish to Chromatic
# uses: chromaui/action@latest
# with:
# projectToken: ${{ secrets.CHROMATIC_TOKEN }}
# workingDir: docs/storybook
# autoAcceptChanges: 'main'
# buildScriptName: 'build'
# onlyChanged: true