2023-06-01 12:20:05 +03:00
|
|
|
name: 'CI Chromatic'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-06-27 18:55:07 +03:00
|
|
|
branches:
|
|
|
|
- main
|
2023-06-26 20:21:51 +03:00
|
|
|
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
|
2023-06-14 17:56:29 +03:00
|
|
|
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
|
|
|
|