mirror of https://gitlab.com/curben/blog
ci(gitlab): switch npm to pnpm
- workaround for hexo issue - doesn't affect renovate
This commit is contained in:
parent
871b9965bb
commit
3ad22a8471
|
@ -4,15 +4,18 @@ cache: # add cache to 'node_modules' for speeding up builds
|
||||||
paths:
|
paths:
|
||||||
- node_modules/ # Node modules and dependencies
|
- node_modules/ # Node modules and dependencies
|
||||||
|
|
||||||
|
variables:
|
||||||
|
NODE_ENV: "production"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
before_script:
|
before_script:
|
||||||
- 'which ssh-agent || (apk update && apk add openssh-client git)'
|
- 'which ssh-agent || (apk update && apk add openssh-client git)'
|
||||||
- npm install -g npm
|
- npm install -g pnpm
|
||||||
- npm install --only=prod
|
- pnpm install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm install snyk && npm run snyk # Refer to "scripts" in package.json
|
- pnpm install snyk && pnpm run snyk # Refer to "scripts" in package.json
|
||||||
- npm run hexo
|
- pnpm run hexo
|
||||||
|
|
||||||
# Update github mirror
|
# Update github mirror
|
||||||
after_script:
|
after_script:
|
||||||
|
@ -45,10 +48,10 @@ test:
|
||||||
|
|
||||||
renovate: # Check dependency update
|
renovate: # Check dependency update
|
||||||
before_script:
|
before_script:
|
||||||
- npm install --only=prod
|
- npm install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm install --only=prod renovate
|
- npm install renovate
|
||||||
- npm run renovate
|
- npm run renovate
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
|
Loading…
Reference in New Issue