diff --git a/.github/workflows/build-design-system.yml b/.github/workflows/build-design-system.yml index f6adff56..8f73cabc 100644 --- a/.github/workflows/build-design-system.yml +++ b/.github/workflows/build-design-system.yml @@ -1,9 +1,6 @@ name: Build Design System on: - push: - paths: - - "packages/design-system/src/tokens/**" # Trigger only when files in the tokens folder change pull_request: paths: - "packages/design-system/src/tokens/**" @@ -16,19 +13,42 @@ jobs: # Step 1: Checkout the repository - name: Checkout repository uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + # Step 2: Cache Bun dependencies + - name: Cache Bun dependencies + id: cache-deps + uses: actions/cache@v4 + with: + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-dependencies-${{ hashFiles('**/bun.lockb') }} + restore-keys: | + ${{ runner.os }}-bun-dependencies- - # Step 2: Set up Bun + # Step 3: Set up Bun - name: Setup Bun uses: oven-sh/setup-bun@v1 with: bun-version: latest - # Step 3: Navigate to the design-system package and install dependencies + # Step 4: Install dependencies only if the cache was not restored - name: Install dependencies + if: steps.cache-deps.outputs.cache-hit != 'true' working-directory: ./packages/design-system run: bun install - # Step 4: Run the build script + # Step 5: Run the build script - name: Run build script working-directory: ./packages/design-system run: bun run build + + # Step 6: Commit and push changes + - name: Commit and push changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "chore: update design system tokens" + branch: ${{ github.head_ref }} + file_pattern: ./packages/design-system/** + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/packages/design-system/src/styles/base/_colors-dark.scss b/packages/design-system/src/styles/base/_colors-dark.scss index a3149b18..638b49c9 100644 --- a/packages/design-system/src/styles/base/_colors-dark.scss +++ b/packages/design-system/src/styles/base/_colors-dark.scss @@ -14,7 +14,7 @@ --error: var(--rose-500); --error-border: var(--red-900); --error-foreground: var(--red-100); - --foreground: var(--zinc-50); + --foreground: var(--zinc-ali2); --information: var(--sky-500); --information-border: var(--blue-900); --information-foreground: var(--blue-100); diff --git a/packages/design-system/src/tokens/token_color_default.json b/packages/design-system/src/tokens/token_color_default.json index ea9b69c7..0436d324 100644 --- a/packages/design-system/src/tokens/token_color_default.json +++ b/packages/design-system/src/tokens/token_color_default.json @@ -61,7 +61,7 @@ }, "foreground": { "$type": "color", - "$value": "{zinc.50}", + "$value": "{zinc.ali2}", "$description": "Default foreground color of ...etc" }, "information": { diff --git a/packages/design-system/src/tokens/token_palette_primitive.json b/packages/design-system/src/tokens/token_palette_primitive.json index 27e75d00..5d5bb39c 100644 --- a/packages/design-system/src/tokens/token_palette_primitive.json +++ b/packages/design-system/src/tokens/token_palette_primitive.json @@ -988,10 +988,6 @@ "$type": "color", "$value": "#a1a1aa" }, - "50": { - "$type": "color", - "$value": "#fafafa" - }, "500": { "$type": "color", "$value": "#71717a" @@ -1015,6 +1011,10 @@ "950": { "$type": "color", "$value": "#09090b" + }, + "50": { + "$type": "color", + "$value": "#fafafa" } } } \ No newline at end of file