2018-09-19 11:31:50 +00:00
|
|
|
# Use latest version of Node.js
|
2018-09-18 09:31:05 +00:00
|
|
|
image: node:latest
|
2016-02-29 14:25:06 +00:00
|
|
|
|
2018-09-19 11:31:50 +00:00
|
|
|
|
2016-02-29 14:25:06 +00:00
|
|
|
pages:
|
2018-09-19 11:31:50 +00:00
|
|
|
cache: # add cache to 'node_modules' for speeding up builds
|
2016-02-29 14:25:06 +00:00
|
|
|
paths:
|
2018-09-19 11:31:50 +00:00
|
|
|
- node_modules/ # Node modules and dependencies
|
2016-02-29 14:25:06 +00:00
|
|
|
|
|
|
|
script:
|
2018-09-19 11:31:50 +00:00
|
|
|
- npm install hexo-cli -g
|
|
|
|
- npm install
|
|
|
|
- hexo deploy # deploy the site
|
|
|
|
- find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \; # Compress files
|
2016-02-29 14:25:06 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2018-09-19 11:31:50 +00:00
|
|
|
- public # deploy to the 'public' folder
|
2016-02-29 14:25:06 +00:00
|
|
|
only:
|
2018-09-19 11:31:50 +00:00
|
|
|
- master # this job will affect only the 'master' branch
|