From 3e3187bd16938988afd2d140d977ea70f9a63589 Mon Sep 17 00:00:00 2001 From: Ming Di Leom <2809763-curben@users.noreply.gitlab.com> Date: Sun, 6 Oct 2024 09:38:22 +0000 Subject: [PATCH] ci: unify deploy job into master branch --- .gitlab-ci.yml | 20 ++++---------------- rsync-include.txt | 3 --- 2 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 rsync-include.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db39601..1aa75d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,22 +48,10 @@ test: deploy: stage: deploy - before_script: - - apk update && apk add openssh-client rsync - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - - echo "$SSH_KEY_1" > ~/.ssh/id_host_1 - - chmod 600 ~/.ssh/id_host_1 - - echo "$SSH_KEY_2" > ~/.ssh/id_host_2 - - chmod 600 ~/.ssh/id_host_2 - - echo "$SSH_CONFIG" > ~/.ssh/config - - chmod 600 ~/.ssh/config - - script: - - rsync -azvh --delete --include-from rsync-include.txt --exclude='*' public/ host-1:/var/www/ - - rsync -azvh --delete --include-from rsync-include.txt --exclude='*' public/ host-2:/var/www/ + trigger: + project: curben/blog + branch: master + strategy: depend rules: - if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "microblog" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")' diff --git a/rsync-include.txt b/rsync-include.txt deleted file mode 100644 index 89cb889..0000000 --- a/rsync-include.txt +++ /dev/null @@ -1,3 +0,0 @@ -microblog/*** -atom-microblog.xml* -sitemap-microblog.xml*