2018-09-26 11:20:21 +00:00
|
|
|
image: node:latest # Use latest version of Node.js
|
2016-02-29 14:25:06 +00:00
|
|
|
|
2018-09-26 11:20:21 +00:00
|
|
|
pages:
|
|
|
|
cache: # add cache to 'node_modules' for speeding up builds
|
|
|
|
paths:
|
|
|
|
- node_modules/ # Node modules and dependencies
|
2016-02-29 14:25:06 +00:00
|
|
|
|
2018-09-25 00:16:25 +00:00
|
|
|
script:
|
2018-09-26 11:20:21 +00:00
|
|
|
- npm install -g snyk hexo-cli
|
2018-09-25 01:14:40 +00:00
|
|
|
- npm install # install node modules
|
2018-09-25 01:39:12 +00:00
|
|
|
- snyk auth $SNYK_TOKEN
|
2018-09-25 01:14:40 +00:00
|
|
|
- snyk protect # Apply patches to node modules
|
2018-09-25 01:39:12 +00:00
|
|
|
- snyk test # Check node modules for vulnerability
|
2018-09-19 11:31:50 +00:00
|
|
|
- hexo deploy # deploy the site
|
2018-09-29 06:03:51 +00:00
|
|
|
|
2016-02-29 14:25:06 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2018-09-19 11:31:50 +00:00
|
|
|
- public # deploy to the 'public' folder
|
2018-09-29 06:03:51 +00:00
|
|
|
|
2018-09-25 00:57:38 +00:00
|
|
|
only:
|
2018-09-26 11:20:21 +00:00
|
|
|
- master # this job will affect only the 'master' branch
|