Я пытаюсь автоматически собрать / развернуть мое угловое приложение на моем удаленном сервере, но я не понимаю, почему gitlab-ci.yml
не работает:
image: trion/ng-cli-karma
cache:
paths:
- node_modules/
before_script:
- apt-get update -qq && apt-get install -y -qq sshpass
deploy_stage:
stage: deploy
environment: Staging
only:
- master
script:
- rm ./package-lock.json
- npm install
- ./node_modules/@angular/cli/bin/ng test --progress false --single-run=true --watch=false
- ./node_modules/@angular/cli/bin/ng e2e --progress false --watch=false
- ./node_modules/@angular/cli/bin/ng build --progress false --prod
- cd dist/
- ls
- sshpass -V
- export SSHPASS=$USER_PASS
- sshpass -e scp -o stricthostkeychecking=no -r . myusername@myserver:/var/www/html
deploy_production:
stage: deploy
environment: Production
only:
- tags
script:
- rm ./package-lock.json
- npm install
- ./node_modules/@angular/cli/bin/ng test --progress false --single-run=true --watch=false
- ./node_modules/@angular/cli/bin/ng e2e --progress false --watch=false
- ./node_modules/@angular/cli/bin/ng build --progress false --prod
- cd dist/
- ls
- sshpass -V
- export SSHPASS=$USER_PASS
- sshpass -e scp -o stricthostkeychecking=no -r . myusername@myserver-prd:/var/www/html
На моем сервере Gitlab CE,Я не вижу эффекта от файла, нет задания сборки:
Я пропустил здесь шаг?