ci(gitlab): switch npm to pnpm

- workaround for hexo issue
- doesn't affect renovate
This commit is contained in:
MDLeom 2020-05-16 07:09:19 +01:00
parent 871b9965bb
commit 3ad22a8471
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 9 additions and 6 deletions

View File

@ -4,15 +4,18 @@ cache: # add cache to 'node_modules' for speeding up builds
paths:
- node_modules/ # Node modules and dependencies
variables:
NODE_ENV: "production"
test:
before_script:
- 'which ssh-agent || (apk update && apk add openssh-client git)'
- npm install -g npm
- npm install --only=prod
- npm install -g pnpm
- pnpm install
script:
- npm install snyk && npm run snyk # Refer to "scripts" in package.json
- npm run hexo
- pnpm install snyk && pnpm run snyk # Refer to "scripts" in package.json
- pnpm run hexo
# Update github mirror
after_script:
@ -45,10 +48,10 @@ test:
renovate: # Check dependency update
before_script:
- npm install --only=prod
- npm install
script:
- npm install --only=prod renovate
- npm install renovate
- npm run renovate
rules: