ci: unify deploy job into master branch

This commit is contained in:
Ming Di Leom 2024-10-06 09:38:22 +00:00
parent 01b2a5913e
commit 3e3187bd16
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
2 changed files with 4 additions and 19 deletions

View File

@ -48,22 +48,10 @@ test:
deploy: deploy:
stage: deploy stage: deploy
before_script: trigger:
- apk update && apk add openssh-client rsync project: curben/blog
- mkdir -p ~/.ssh branch: master
- chmod 700 ~/.ssh strategy: depend
- 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/
rules: rules:
- if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "microblog" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")' - if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "microblog" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")'

View File

@ -1,3 +0,0 @@
microblog/***
atom-microblog.xml*
sitemap-microblog.xml*