Skip to content

Sync

Sync #430

Workflow file for this run

name: Sync
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
env:
NODE_VERSION: 18
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"
token: ${{ secrets.PAT }}
repository: privy-open-source/design-system
- name: Get Cache Dir
id: yarn-cache-dir
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Use Cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install Deps
run: yarn install --immutable
- name: Run Sync Icon
run: yarn icon:sync
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
FIGMA_FILE_ID: ${{ secrets.FIGMA_FILE_ID }}
- name: Run Sync Ilustration
run: yarn ilustration:sync
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
FIGMA_FILE_ID: ${{ secrets.FIGMA_FILE_ID_ILUSTRATION }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}
branch: feat/sync-icon
commit-message: "chore: sync with figma"
title: "chore: sync with figma"