Skip to content
Merged
32 changes: 26 additions & 6 deletions .github/workflows/build-design-system.yml
Original file line number Diff line number Diff line change
@@ -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/**"
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion packages/design-system/src/styles/base/_colors-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/src/tokens/token_color_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"foreground": {
"$type": "color",
"$value": "{zinc.50}",
"$value": "{zinc.ali2}",
"$description": "Default foreground color of <body />...etc"
},
"information": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,6 @@
"$type": "color",
"$value": "#a1a1aa"
},
"50": {
"$type": "color",
"$value": "#fafafa"
},
"500": {
"$type": "color",
"$value": "#71717a"
Expand All @@ -1015,6 +1011,10 @@
"950": {
"$type": "color",
"$value": "#09090b"
},
"50": {
"$type": "color",
"$value": "#fafafa"
}
}
}
Loading