From 3d643762b4e5ead94a03b8d6f24a180f3f58726a Mon Sep 17 00:00:00 2001 From: DevMirza <53424436+Zaid-maker@users.noreply.github.com> Date: Sat, 4 May 2024 22:58:27 +0500 Subject: [PATCH] check if directory exits --- .github/workflows/bench-turbopack.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bench-turbopack.yml b/.github/workflows/bench-turbopack.yml index 50d7ed75043853..ea4590fe925a23 100644 --- a/.github/workflows/bench-turbopack.yml +++ b/.github/workflows/bench-turbopack.yml @@ -294,7 +294,11 @@ jobs: - name: Copy benchmark results run: | - find artifacts -size 0 -delete + if [ ! -d artifacts ]; then + echo "Artifacts directory not found. Skipping copy." + exit 0 + fi + find artifacts -size 0 -delete || true mkdir -p data/${{ steps.date.outputs.year }}/${{ steps.date.outputs.month }}/ubuntu-latest-8-core/${{ steps.date.outputs.date }}-${{ github.sha }}/ mv artifacts/bench_* data/${{ steps.date.outputs.year }}/${{ steps.date.outputs.month }}/ubuntu-latest-8-core/${{ steps.date.outputs.date }}-${{ github.sha }}/