2022-03-15 13:50:42 +01:00
|
|
|
---
|
|
|
|
name: Chromatic
|
|
|
|
|
2022-06-22 14:32:45 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/workflows/**'
|
2022-03-15 13:50:42 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
chromatic:
|
|
|
|
name: Chromatic
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Node
|
2023-05-09 18:38:11 +02:00
|
|
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
|
2022-03-15 13:50:42 +01:00
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
|
|
|
|
- name: Checkout repo
|
2023-05-09 18:38:11 +02:00
|
|
|
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
2022-03-15 13:50:42 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Cache npm
|
|
|
|
id: npm-cache
|
2023-05-05 22:17:19 +02:00
|
|
|
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
2022-03-15 13:50:42 +01:00
|
|
|
with:
|
|
|
|
path: "~/.npm"
|
|
|
|
key: ${{ runner.os }}-npm-chromatic-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm ci
|
|
|
|
|
|
|
|
- name: Publish to Chromatic
|
2023-05-09 11:44:05 +02:00
|
|
|
uses: chromaui/action@d51b84e79d164fbe8fc5bb7175695d88ddd04b72
|
2022-03-15 13:50:42 +01:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
|
|
exitOnceUploaded: true
|
|
|
|
onlyChanged: true
|
2022-08-05 17:45:36 +02:00
|
|
|
externals: "[\"libs/components/**/*.scss\", \"libs/components/tailwind.config*.js\"]"
|