mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
bd4453cce5
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
---
|
|
name: Chromatic
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 'renovate/**'
|
|
paths-ignore:
|
|
- '.github/workflows/**'
|
|
|
|
jobs:
|
|
chromatic:
|
|
name: Chromatic
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get Node Version
|
|
id: retrieve-node-version
|
|
run: |
|
|
NODE_NVMRC=$(cat .nvmrc)
|
|
NODE_VERSION=${NODE_NVMRC/v/''}
|
|
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
|
with:
|
|
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}
|
|
|
|
- name: Cache npm
|
|
id: npm-cache
|
|
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
|
with:
|
|
path: "~/.npm"
|
|
key: ${{ runner.os }}-npm-chromatic-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- name: Install Node dependencies
|
|
run: npm ci
|
|
|
|
# Manual build the storybook to resolve a chromatic/storybook bug related to TurboSnap
|
|
- name: Build Storybook
|
|
run: npm run build-storybook:ci
|
|
|
|
- name: Publish to Chromatic
|
|
uses: chromaui/action@c9067691aca4a28d6fbb40d9eea6e144369fbcae # v10.9.5
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
storybookBuildDir: ./storybook-static
|
|
exitOnceUploaded: true
|
|
onlyChanged: true
|
|
externals: "[\"libs/components/**/*.scss\", \"libs/components/**/*.css\", \"libs/components/tailwind.config*.js\"]"
|