24 lines
713 B
YAML
24 lines
713 B
YAML
build website:
|
|
stage: build
|
|
# requiring the environment of NodeJS 4.2.2
|
|
image: node:latest
|
|
# add 'node_modules' to cache for speeding up builds
|
|
cache:
|
|
paths:
|
|
- node_modules/ # Node modules and dependencies
|
|
script:
|
|
- npm install -g hexo-cli # Install Hexo itself
|
|
- npm install # Install Hexo modules and dependencies
|
|
- npm install hexo-renderer-pug # Install Butterfly pug
|
|
- npm install hexo-renderer-stylus # Install stylus renderer
|
|
|
|
deploy:
|
|
stage: deploy
|
|
script:
|
|
- hexo clean # Hexo clean previous static site
|
|
- hexo generate # Hexo generate Static Site
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master # this job will affect only the 'master' branch |