Created
May 18, 2017 10:27
-
-
Save oquirozm/6312020f971c34fc0ae370a367188749 to your computer and use it in GitHub Desktop.
This is a .yml file to setup up ftp deployment in GitLab. Super awesome. Remember to set up the environmental variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
script: | |
- apt-get update -qq && apt-get install -y -qq lftp | |
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/" | |
only: | |
- master |
Another testament to BACKUP EVERYTHING. Or set a write directory with -O /source-directory/
within the mirror
command.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just in case someone is wondering about the
mirror -Rnev
part, from the LFTP man page:Be careful and BACKUP EVERYTHING on the destination path before you deploy anything.