My goal is to use FTP to upload only changed files when there is a merge into the dev branch. I have set up a pipeline with the following in the gitlab-ci.yml:
image: mwienk/docker-lftp:latest upload: stage: deploy script: - lftp -e "set ssl:verify-certificate no; set ftp:ssl-allow no; mirror -X .* -X .*/ --reverse --only-newer --verbose source-dir/ dest-dir; exit;" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST only: - develop when: on_success
The trigger and FTP login work correctly, but it always deletes and then uploads all the files in the source-dir. Even though some of the files shown in the dev branch on GitLab are older than those on the server, they are not skipped.
I appreciate any suggestions.