From 1b436f0f56d936357fdaa2c9c49abc504454da39 Mon Sep 17 00:00:00 2001 From: Gaubee Date: Mon, 12 Jan 2026 18:24:25 +0800 Subject: [PATCH] fix(ci): preserve packages/*/dist to avoid rebuilding --- .github/workflows/cd.yml | 6 +++--- .github/workflows/ci.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6173e1335..26a80eef3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -48,14 +48,14 @@ jobs: git clone https://github.com/${{ github.repository }}.git . else # Self-hosted runners keep the workspace between runs; ensure clean checkout - # Preserve .turbo cache and node_modules for faster builds + # Preserve caches and build artifacts for faster builds git reset --hard HEAD - git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' + git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist' fi git fetch origin ${{ github.sha }} --depth=1 --tags git checkout -f ${{ github.sha }} git reset --hard HEAD - git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' + git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist' - name: Determine channel id: channel diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19a88e412..fd88bd34d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,14 +20,14 @@ jobs: git clone --depth=1 https://github.com/${{ github.repository }}.git . else # Self-hosted runners keep the workspace between runs; ensure clean checkout - # Preserve .turbo cache and node_modules for faster builds + # Preserve caches and build artifacts for faster builds git reset --hard HEAD - git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' + git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist' fi git fetch origin ${{ github.event.pull_request.head.sha || github.sha }} --depth=1 git checkout -f ${{ github.event.pull_request.head.sha || github.sha }} git reset --hard HEAD - git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' + git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist' - name: Detect changes id: changes