Use rsync to deploy prod site

parent 6cef6fd6
Pipeline #65 failed with stage
in 1 minute and 38 seconds
...@@ -9,15 +9,15 @@ variables: ...@@ -9,15 +9,15 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
before_script: before_script:
- apk add lftp
- ./scripts/ci_fix_baseurl.sh - ./scripts/ci_fix_baseurl.sh
deploy-prod: deploy-prod:
stage: deploy stage: deploy
script: script:
- apk add rsync
- bundle install - bundle install
- jekyll build -d public - jekyll build -d public
- ./scripts/ci_deploy_site.sh public - rsync -e "ssh -i $SSH_DEPLOY_KEY" --delete-after -r public/ "sftp://$SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:/www.poul.org/"
cache: cache:
key: gems key: gems
paths: paths:
......
#!/bin/bash
deploy_path="$1"
lftp << EOF
set sftp:connect-program "ssh -a -x -i $SSH_DEPLOY_KEY"
open -u $SSH_DEPLOY_USER, sftp://$SSH_DEPLOY_HOST
mirror -R --delete "$deploy_path/" /www.poul.org/
exit
EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment