From 8d7251f2d2b6f2d0bac60975cb873a9793e9c9ec Mon Sep 17 00:00:00 2001 From: fzorb Date: Thu, 6 Mar 2025 10:56:03 +0000 Subject: [PATCH] maybe this will work --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..accfb11 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +stages: + - deploy + +deploy-job: + stage: deploy + image: ubuntu:latest + before_script: + - apt-get update + - apt-get install -y rsync openssh-client hugo git sshpass + + script: + - git clone https://git.fzorb.xyz/fzorb/website + - cd website + - git submodule foreach --recursive git reset --hard && git submodule init && git submodule update --recursive + - hugo + - ssh-keyscan -p 69 fzorb.xyz >> ~/.ssh/known_hosts + - sshpass -p "$PASSWD" rsync -avzh website/public/ -e 'ssh -p 69' git@fzorb.xyz:/var/www/fzorb.xyz + - sshpass -p "$PASSWD" ssh -p 69 git@fzorb.xyz "chmod 777 -R /var/www/fzorb.xyz" + + only: + - main