feat(CI): now using lftp instead of sftp
This commit is contained in:
parent
6081651e94
commit
5c8dabf19a
|
@ -23,15 +23,11 @@ Deploy:
|
||||||
image: alpine
|
image: alpine
|
||||||
stage: deploy
|
stage: deploy
|
||||||
before_script:
|
before_script:
|
||||||
- apk add openssh-client findutils
|
- apk add openssh-client lftp
|
||||||
- eval $(ssh-agent -s)
|
- eval $(ssh-agent -s)
|
||||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||||
script:
|
script:
|
||||||
- cd _site
|
- lftp sftp://fainsil:DUMMY@ftp.perso.bde.inp-toulouse.fr -e "mirror -e -R _site www_public ; quit"
|
||||||
- find . -depth -type "f" -printf "%P\n" | grep -v -e content -e .sftp | awk '{print "rm "$1}' > .sftp_rm
|
|
||||||
- find . -depth -type "d" -printf "%P\n" | grep -v -e content -e .sftp | awk '{print "rmdir "$1}' > .sftp_rmdir
|
|
||||||
- find . -depth -type "f" -printf "%P\n" | grep -v -e content -e .sftp | awk '{print "put -r "$1}' > .sftp_put
|
|
||||||
- cat .sftp_rm .sftp_rmdir .sftp_put | sftp -v fainsil@ftp.perso.bde.inp-toulouse.fr:www_public
|
|
||||||
|
|
Reference in a new issue