cache
This commit is contained in:
parent
fbe95baf7e
commit
8ba8449c8a
1 changed files with 17 additions and 1 deletions
18
.github/workflows/respond-to-cubic-dev-ai.yml
vendored
18
.github/workflows/respond-to-cubic-dev-ai.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue