doc: update .gitlab-ci.yml to test if the CI/CD works
This commit is contained in:
1 parent
fbd21e1bc4
commit
f03cacac79
1 file changed
+19
-4
+19
-4
@@ -1,13 +1,28 @@
|
||||
build website:
|
||||
stage: build
|
||||
# requiring the environment of NodeJS 4.2.2
|
||||
image: node:latest
|
||||
# add 'node_modules' to cache for speeding up builds
|
||||
# Using the latest of ubuntu image
|
||||
image: ubuntu:latest
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/ # Node modules and dependencies
|
||||
script:
|
||||
|
||||
before_script:
|
||||
- apt-get update -qy # Check for update
|
||||
- apt-get install -y lftp # Install lftp
|
||||
- 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 via lftp:
|
||||
stage: deploy
|
||||
script:
|
||||
- hexo clean # Hexo clean previous static site
|
||||
- hexo generate # Hexo generate Static Site
|
||||
- lftp -e "set ssl:verify-certificate no; open $FTP_HOST; user $FTP_USERNAME $FTP_PASSWORD $FTP_PORT; mirror -X .* -X .*/ --reverse --verbose --delete local-folder/ destination-folder/; bye"
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- master # this job will affect only the 'master' branch
|
||||
Reference in new issue
Block a user