New Crowdin updates #6197
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on .github/workflows/chromatic.yml | |
# Workflow name | |
name: 'Chromatic' | |
# Event for the workflow | |
on: | |
pull_request: | |
types: [opened,edited,reopened,synchronize,labeled] | |
paths: | |
- '_dev/**' | |
push: | |
branches: | |
- master | |
env: | |
PNPM_VERSION: 8 | |
NODE_VERSION: 20 | |
# List of jobs | |
jobs: | |
chromatic-deployment: | |
# Operating System | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'waiting for UX') && github.event.pull_request.head.repo.full_name == 'PrestaShopCorp/psxmarketingwithgoogle') | |
# Job steps | |
steps: | |
# 👇 Version 2 of the action | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # 👈 Required to retrieve git history | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
cache-dependency-path: '_dev/pnpm-lock.yaml' | |
- name: Install dependencies | |
working-directory: ./_dev | |
run: pnpm install | |
# Tests are mandatory to build storybook | |
- name: Run tests | |
working-directory: ./_dev/apps/ui | |
run: npm run test:generate-output | |
# 👇 Adds Chromatic as a step in the workflow | |
- name: Publish to Chromatic | |
uses: chromaui/action@v1 | |
# Chromatic GitHub Action options | |
with: | |
workingDir: ./_dev/apps/ui | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# 👇 Chromatic projectToken | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |