doc: update .gitlab-ci.yml to remove build stage

This commit is contained in:
Leon Xu committed 2022-03-15 17:54:10 -07:00
1 parent 50a5f6f657
commit 64c56065d8
1 file changed
+3 -19
+3 -19
View File
@@ -1,30 +1,14 @@
build website:
stage: build
# requiring the environment of latest NodeJS version
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 to website:
stage: deploy
# requiring the environment of latest NodeJS version
image: node:latest
before_script:
- apt-get update -qy
- apt-get install -y lftp
- npm i -g hexo-cli
- npm i
script:
- git config --global init.defaultBranch master
- hexo generate # Deploy hexo to domain
- lftp -e "mirror -R public/ $ FTP_REMOTE_PATH" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
- hexo generate # Deploy generate hexo files
- hexo deploy # Deploy generated files to server
only:
- master # this job will affect only the 'master' branch