forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.15 KB
/
ci-chromatic.yaml
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: 'CI Chromatic'
on:
push:
branches:
- main
paths:
- 'package.json'
- 'packages/twenty-front/**'
pull_request:
types: [labeled]
paths:
- 'package.json'
- 'packages/twenty-front/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
chromatic-deployment:
if: contains(github.event.pull_request.labels.*.name, 'run-chromatic') || github.event_name == 'push'
runs-on: ubuntu-latest
env:
REACT_APP_SERVER_BASE_URL: http://127.0.0.1:3000
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Front / Write .env
run: |
cd packages/twenty-front
touch .env
echo "REACT_APP_SERVER_BASE_URL: $REACT_APP_SERVER_BASE_URL" >> .env
- name: Front / Install Dependencies
run: yarn
- name: Publish to Chromatic
run: |
cd packages/twenty-front
yarn nx chromatic:ci