samuel-philipp.de/.gitlab-ci.yml

29 lines
497 B
YAML
Raw Normal View History

2019-10-24 17:01:35 +00:00
stages:
- build
- deploy
2019-10-27 19:35:10 +00:00
build:
image: node
stage: build
dependencies: []
before_script:
- rm package-lock.json
2019-10-27 19:40:22 +00:00
- npm install
2019-10-27 19:35:10 +00:00
script:
- npm run build
cache:
paths:
- node_modules/
artifacts:
paths:
- dist/
2019-10-24 17:01:35 +00:00
deploy:
image: alpine
stage: deploy
2019-10-27 19:35:10 +00:00
dependencies:
- build
2019-10-24 17:01:35 +00:00
before_script:
2019-10-27 19:35:10 +00:00
- which lftp || ( apk --update add lftp )
2019-10-24 17:01:35 +00:00
script:
2019-10-27 19:40:22 +00:00
- lftp -e "mirror -R ./dist/ samuel-philipp.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST