Skip to content

Instantly share code, notes, and snippets.

@antoninbouchal
Created December 22, 2020 06:51
Show Gist options
  • Save antoninbouchal/9e8bc8e2d1316ef61e2f3e517952bab2 to your computer and use it in GitHub Desktop.
Save antoninbouchal/9e8bc8e2d1316ef61e2f3e517952bab2 to your computer and use it in GitHub Desktop.
Gitlab CI for uploading to FTP
stages:
- deploy
deploy:
image: ubuntu:18.04
when: manual
stage: deploy
before_script:
- apt-get update -qy
- apt-get install -y lftp
- apt-get install -y nodejs npm
script:
- npm i
- npm run build
- lftp -e "set ssl:verify-certificate no; open $FTP_HOST; user $FTP_USERNAME $FTP_PASSWORD; mirror --reverse --verbose --delete dist/ $FTP_TARGET_DIR; bye"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment