How to create a ZIP and upload to FTP via CI/CD

Hi there

I’m really new to github, gitlab and all these kinds of systems. I got a tip by a friend of mine that I should automate my hobbyist stuff.

Now i put all my work on a repository, not the gitlab but a hosted one. Now I want to automate the last step of my work - that is zipping all files of the repository and then uploading that zip with a specific name to a specific folder via ftp so the download link wont be broken.

  1. All files of the repo need to be zipped directly (not put in a folder and then zipped)
  2. this zip needs a specific name
  3. Upload to a server / folder

The last part is solved with lftp I think:

- apt-get update -qq && apt-get install -y -qq lftp
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST;  --ignore-time --parallel=10"

but also unsure about the correct command. file need to be put into /var/www/html/dl called or something like that.

unluckily the friend who promotet to me this all to me does not know how to do that -.-

Would be great if someone could explain me what i have to put in the ci file :slight_smile: