Update .gitlab-ci.yml file

This commit is contained in:
Leon Xu committed 2022-03-15 23:00:07 +00:00
1 parent 15d031a9e2
commit 75cd412595
1 file changed
+7
+7
View File
@@ -15,11 +15,18 @@ build website:
deploy to website:
stage: deploy
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
- npm install -g hexo-cli # Install hexo itself
- npm install # Install Hexo modules and dependencies
- hexo clean # Hexo clean previous static site
- lftp -u $FTP_USERNAME,$FTP_PASSWORD server281.web-hosting.com -e "mirror /home/$FTP_USERNAME/public_html/ -R -p site dev ; quit"
- hexo deploy # Deploy hexo to domain
only:
- master # this job will affect only the 'master' branch