mirror of https://gitlab.com/curben/blog
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
image: node:latest # Use latest version of Node.js
|
|
|
|
test:
|
|
cache: # add cache to 'node_modules' for speeding up builds
|
|
paths:
|
|
- node_modules/ # Node modules and dependencies
|
|
|
|
script:
|
|
- npm install -g snyk hexo-cli
|
|
- npm install # install node modules
|
|
- snyk auth $SNYK_TOKEN
|
|
- snyk protect # Apply patches to node modules
|
|
- snyk test # Check node modules for vulnerability
|
|
- hexo generate # Generate static files for debugging
|
|
|
|
only:
|
|
- master # this job will affect only the 'master' branch
|
|
|
|
|
|
# # Uncomment below (and comment/remove above) lines for gitlab pages
|
|
# image: node:latest # Use latest version of Node.js
|
|
# pages:
|
|
# cache: # add cache to 'node_modules' for speeding up builds
|
|
# paths:
|
|
# - node_modules/ # Node modules and dependencies
|
|
|
|
# script:
|
|
# - npm install -g snyk hexo-cli
|
|
# - npm install # install node modules
|
|
# - snyk auth $SNYK_TOKEN
|
|
# - snyk protect # Apply patches to node modules
|
|
# - snyk test # Check node modules for vulnerability
|
|
# - hexo deploy # deploy the site.
|
|
|
|
# artifacts:
|
|
# paths:
|
|
# - public # deploy to the 'public' folder.
|
|
|
|
# only:
|
|
# - master # this job will affect only the 'master' branch
|