twenty/.github/workflows/ci-chromatic.yaml

37 lines
1010 B
YAML
Raw Normal View History

2023-06-01 12:20:05 +03:00
name: 'CI Chromatic'
on:
push:
branches:
- main
2023-09-17 02:33:23 +03:00
pull_request:
2023-08-01 04:23:39 +03:00
types: [labeled]
2023-06-01 12:20:05 +03:00
jobs:
chromatic-deployment:
if: contains(github.event.pull_request.labels.*.name, 'run-chromatic') || github.event_name == 'push'
2023-06-01 12:20:05 +03:00
runs-on: ubuntu-latest
env:
REACT_APP_SERVER_BASE_URL: http://127.0.0.1:3000
2023-06-01 12:20:05 +03:00
steps:
2023-09-17 02:33:23 +03:00
- uses: actions/checkout@v4
2023-09-17 05:28:04 +03:00
with:
fetch-depth: 0
2023-06-01 12:20:05 +03:00
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Front / Write .env
run: |
cd front
touch .env
echo "REACT_APP_SERVER_BASE_URL: $REACT_APP_SERVER_BASE_URL" >> .env
2023-06-01 12:20:05 +03:00
- name: Front / Install Dependencies
run: cd front && yarn
2023-06-01 12:20:05 +03:00
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
workingDir: ./front
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
2023-06-13 19:45:18 +03:00
onlyChanged: true
2023-07-07 04:53:26 +03:00
buildScriptName: storybook:build
2023-06-01 12:20:05 +03:00