From 75cd41259590a7d8cfdb86f2c23cc2ee30b8719a Mon Sep 17 00:00:00 2001 From: Leon Xu <6479451-leonxu260@users.noreply.gitlab.com> Date: Tue, 15 Mar 2022 23:00:07 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ac6727..9e71271 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file