Files
Hexo-Butterfly/.gitlab-ci.yml
T

25 lines
945 B
YAML

# Using the latest of ubuntu image
image: ubuntu:latest
before_script:
- apt update -qy # Check for update
- apt install -y lftp # Install lftp
- apt install curl -y # Install curl
- curl -fsSL https://deb.nodesource.com/setup_current.x | bash
- apt install nodejs -y # Install NodeJS
- 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 ftp:ssl-protect-data true ; mirror -R .* -X .*/ --reverse --verbose --delete public/ $FTP_REMOTE_PATH/; quit" -u $FTP_USER,$FTP_PASS $FTP_HOST $FTP_PORT
artifacts:
paths:
- public
only:
- master # this job will affect only the 'master' branch