From 8ba8449c8ac7442d2bbaa3abf30acd024d7644ce Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 14 Aug 2025 22:14:53 -0700 Subject: [PATCH] cache --- .github/workflows/respond-to-cubic-dev-ai.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/respond-to-cubic-dev-ai.yml b/.github/workflows/respond-to-cubic-dev-ai.yml index f2dbe0c47..b5e0d4a79 100644 --- a/.github/workflows/respond-to-cubic-dev-ai.yml +++ b/.github/workflows/respond-to-cubic-dev-ai.yml @@ -60,12 +60,28 @@ jobs: node-version: "20" cache: "npm" - - name: Install dependencies and build CLI + - name: Cache build output if: steps.check-mention.outputs.contains_mention == 'true' + id: cache-build + uses: actions/cache@v4 + with: + path: | + dist/ + node_modules/ + key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json', 'src/**/*', 'tsconfig*.json') }} + restore-keys: | + ${{ runner.os }}-build- + + - name: Install dependencies and build CLI + if: steps.check-mention.outputs.contains_mention == 'true' && steps.cache-build.outputs.cache-hit != 'true' run: | npm ci npm run build + - name: Install dependencies only (cache hit) + if: steps.check-mention.outputs.contains_mention == 'true' && steps.cache-build.outputs.cache-hit == 'true' + run: npm ci --prefer-offline + - name: Start remote session if: steps.check-mention.outputs.contains_mention == 'true' id: remote-session