From ba019377030cb5b7fce30c04c940bb92f22cf9dd Mon Sep 17 00:00:00 2001 From: Jixun Wu Date: Sat, 10 Jun 2023 17:22:28 +0100 Subject: [PATCH] ci: make use of pnpm store cache (#23) --- .drone.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f82f0b5..c3d60c7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,11 +6,17 @@ name: default steps: - name: test & build image: node:18.16.0-bullseye + volumes: + - name: pnpm-store-cache + path: /drone/.pnpm-store commands: # - git config --global --add safe.directory "/drone/src" - - npm install -g pnpm + - corepack enable # npm i -g pnpm - pnpm i --frozen-lockfile - pnpm build + environment: + npm_config_store_dir: /drone/.pnpm-store + npm_config_package_import_method: copy - name: publish image: node:18.16.0-bullseye @@ -28,3 +34,8 @@ steps: - (cd dist && zip -r -9 ../um-react.zip .) - ./scripts/publish.sh - ./scripts/deploy.sh + +volumes: + - name: pnpm-store-cache + host: + path: /tmp/.pnpm-store