Created
December 22, 2020 06:51
-
-
Save antoninbouchal/9e8bc8e2d1316ef61e2f3e517952bab2 to your computer and use it in GitHub Desktop.
Gitlab CI for uploading to FTP
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
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