mirror of https://gitlab.com/curben/blog
'only:' cannot be set globally
must be inside a job and must be an array not a string
This commit is contained in:
parent
1b594c706e
commit
9ede298e68
|
@ -10,20 +10,21 @@ cache: # add cache to 'node_modules' for speeding up builds
|
||||||
paths:
|
paths:
|
||||||
- node_modules/ # Node modules and dependencies
|
- node_modules/ # Node modules and dependencies
|
||||||
|
|
||||||
only:
|
|
||||||
- master # CI will affect only the 'master' branch
|
|
||||||
|
|
||||||
build-job:
|
build-job:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- npm install -g hexo-cli snyk
|
- npm install -g hexo-cli snyk
|
||||||
- npm install
|
- npm install
|
||||||
- snyk auth $SNYK_TOKEN
|
- snyk auth $SNYK_TOKEN
|
||||||
|
only:
|
||||||
|
- master # job will affect only the 'master' branch
|
||||||
|
|
||||||
snyk-test:
|
snyk-test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- snyk test # Test node modules for vulnerability
|
- snyk test # Test node modules for vulnerability
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -34,4 +35,6 @@ pages:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public # deploy to the 'public' folder
|
- public # deploy to the 'public' folder
|
||||||
|
only:
|
||||||
|
- master
|
||||||
when: on_success
|
when: on_success
|
Loading…
Reference in New Issue