Skip to content

Instantly share code, notes, and snippets.

@Wanchai
Created April 18, 2020 03:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wanchai/7f2832744d2dd727554bafa286783ca1 to your computer and use it in GitHub Desktop.
Save Wanchai/7f2832744d2dd727554bafa286783ca1 to your computer and use it in GitHub Desktop.
Deploy a gitlab artifact through FTP - Used here with an Angular build
variables:
HOST: ftp.myhost.com
USER: login
PASSWD: password
build:
stage: build
image: trion/ng-cli
before_script:
- npm ci
script:
- npm run build
artifacts:
expire_in: 1 day
paths:
- dist/
only:
- master
tags:
- docker
deploy:
stage: deploy
script:
- lftp -c "set ftp:ssl-allow no; open -u $USER,$PASSWD $HOST; glob -a rm -r ./TARGET_FOLDER/*; mirror -Rev dist/ ./TARGET_FOLDER --ignore-time --parallel=10"
only:
- master
tags:
- NAME_OF_YOUR_RUNNER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment