New Crowdin updates #140
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: | |
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/ps_facebook') | |
# Job steps | |
steps: | |
# π Version 2 of the action | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # π Required to retrieve git history | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: npm | |
cache-dependency-path: '_dev/package-lock.json' | |
- name: Install dependencies | |
working-directory: ./_dev | |
run: npm install | |
# π Adds Chromatic as a step in the workflow | |
- name: Publish to Chromatic | |
uses: chromaui/action@v10 | |
# Chromatic GitHub Action options | |
with: | |
workingDir: ./_dev | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# π Chromatic projectToken | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |