-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (42 loc) · 1.36 KB
/
chromatic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "Chromatic"
# Event for the workflow
on: push
# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: ASDF cache
uses: actions/cache@v3
with:
path: ~/.asdf
key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }}
id: asdf-cache
- name: Setup ASDF environment
run: |
ASDF_DIR=$HOME/.asdf
echo "ASDF_DIR=$ASDF_DIR" >> $GITHUB_ENV
echo "ASDF_DATA_DIR=$ASDF_DIR" >> $GITHUB_ENV
echo "$ASDF_DIR/bin" >> $GITHUB_PATH
echo "$ASDF_DIR/shims" >> $GITHUB_PATH
$ASDF_DIR/bin/asdf reshim
- name: Restore dependencies cache
id: deps-cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: pushd assets && npm ci && popd
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}