diff --git a/deploy/gitlab-ci-hor-18.yml b/deploy/gitlab-ci-hor-18.yml new file mode 100644 index 0000000000000000000000000000000000000000..eb8716d81469830eef4f51b9b20e0dd8be745e66 --- /dev/null +++ b/deploy/gitlab-ci-hor-18.yml @@ -0,0 +1,41 @@ +variables: + LC_ALL: C.UTF-8 + COPY_DIR: web/ + +.deploy: + image: debian:bullseye + stage: deploy + variables: + before_script: + - apt-get update -qy + - apt-get install -y lftp + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan $SFTP_HOST >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + script: + - lftp -e "set sftp:auto-confirm yes; + open sftp://$SFTP_HOST; + user $SFTP_USER $SFTP_PASSWORD; + mirror --exclude-glob .git* + --exclude .git/ + --reverse + --verbose + --delete + $COPY_DIR + $DEPLOY_DIR; + bye" + +deploy.dev: + extends: .deploy + variables: + DEPLOY_DIR: $DEV_DEPLOY_DIR + only: + - web.dev + +deploy.prod: + extends: .deploy + variables: + DEPLOY_DIR: $PROD_DEPLOY_DIR + only: + - web.prod