Skip to content

Instantly share code, notes, and snippets.

@Pamps
Last active February 11, 2021 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Pamps/7d7e5b3d629496063d027e23f89ea5f0 to your computer and use it in GitHub Desktop.
Save Pamps/7d7e5b3d629496063d027e23f89ea5f0 to your computer and use it in GitHub Desktop.
My default GitLab CI FTP deploy for WordPress sites, works well on SiteGround, SpeedyDot and others
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 -Rnv ./ public_html/ --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
only:
- master
@Pamps
Copy link
Author

Pamps commented Dec 6, 2018

Use the --just-print parameter to simulate the changes. Useful for when testing an existing setup, and you don't want to hose the already uploaded files.

e.g. mirror -Rnv --just-print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment