Deploy with CI on FTP Server

Hello everyone,
first of all: I am total new to Gitlab.
I want to “simply” deploy all my files inside my master branch to a FTP Server.

I googled and found this:

and this:

I wondered if this is still up to date?

Will my .yml File look like this in the end?

apt-get install lftp
lftp -u username,passwd ftp.foobar.cmo \
 -e "mirror -e -R -x .git -x static/ -p ./ dev-site ; quit"

Or is there anything more i have to write?

Sorry but i always think it is faster to write a small question instead of reading the docs 8 hours.

Thanks in advance!


I ended up with the same question. Here is my current solution for the deploy stage:

      image: mwienk/docker-lftp
      stage: deploy
        - lftp -u $FTP_USER,$FTP_PASS $HOST -e "set ftp:ssl-allow no ; mirror -e -R -p ./dist/ new/ ; quit" 
        - echo "deployment complete"
      # specify environment this job is using
        name: staging
      # needs artifacts from previous build
        - build
      # only run on dev branch
        - dev

a nice explanation for the lftp statement parameters can be found here:

or in the official lftp docs:

I hope i could help you or somebody else who wants to create a gitlab job for uploading to a ftp directory.