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

37 lines
1006 B
YAML
Raw Normal View History

2023-06-01 12:20:05 +03:00
name: 'CI Chromatic'
on:
push:
branches:
- main
pull_request_target:
2023-06-01 12:20:05 +03:00
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
env:
REACT_APP_API_URL: http://127.0.0.1:3000/graphql
REACT_APP_AUTH_URL: http://127.0.0.1:3000/auth
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
2023-07-05 01:04:05 +03:00
ref: ${{ github.head_ref || github.ref_name }}
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_API_URL: $REACT_APP_API_URL" >> .env
echo "REACT_APP_AUTH_URL: $REACT_APP_AUTH_URL" >> .env
- 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-06-01 12:20:05 +03:00