Created
April 18, 2020 03:27
-
-
Save Wanchai/7f2832744d2dd727554bafa286783ca1 to your computer and use it in GitHub Desktop.
Deploy a gitlab artifact through FTP - Used here with an Angular build
This file contains 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
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