Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add staking chromatic #903

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/staking-chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Lace Staking Chromatic

on:
pull_request:
paths:
- packages/staking/**
push:
paths:
- packages/staking/**
branches:
- main

jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 🧰 Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: 📝 Cache
uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ~/.yarn/berry/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: 💽 Install dependencies
run: yarn --immutable --inline-builds

- name: 🧑‍🔬 Build
run: yarn workspaces foreach -Rpt -v --from '@lace/staking' run build

- name: 🧑‍🔬 Linter
working-directory: ./packages/staking
run: yarn lint

- name: 👩‍🔬 Tests
working-directory: ./packages/staking
run: yarn test-storybook:ci

- name: 🌍 Publish to Chromatic
if: github.ref != 'refs/heads/main'
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_LACE_STAKING_TOKEN }}
workingDir: ./packages/staking
buildScriptName: build-storybook
onlyChanged: true

- name: 🌍 Publish to Chromatic and auto accept changes
if: github.ref == 'refs/heads/main'
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_LACE_STAKING_TOKEN }}
autoAcceptChanges: true
workingDir: ./packages/staking
onlyChanged: true
Loading