Browse Source

Update .gitlab-ci.yml

f/2-backend-asp-net-core-initialisieren
Levin Faber 7 years ago
parent
commit
a6f323c8eb
  1. 9
      .gitlab-ci.yml

9
.gitlab-ci.yml

@ -6,8 +6,7 @@ build_frontend:
stage: build
image: registry.gitlab.com/fia72-dev/eva_lernsituation/frontend-build
before_script:
- echo "${DEPLOY_ENV_KEY}" > /workdir/deploy_key
- chmod 600 /workdir/deploy_key
- ssh-add <(${DEPLOY_ENV_KEY})
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- cp -r Frontend/src/ /workdir/src/
@ -18,6 +17,6 @@ build_frontend:
- cd /workdir
- npm run build
- ls -la /workdir/build
- ssh $DEPLOY_ENV_USER@$DEPLOY_ENV_TARGET -i /workdir/deploy_key "mkdir -p /opt/serve/"
- ssh $DEPLOY_ENV_USER@$DEPLOY_ENV_TARGET -i /workdir/deploy_key "rm -rf /opt/serve/*"
- rsync --progress -av -e "ssh -i /workdir/deploy_key" /workdir/build $DEPLOY_ENV_USER@$DEPLOY_ENV_TARGET:/opt/serve/
- ssh $DEPLOY_ENV_USER@$DEPLOY_ENV_TARGET "mkdir -p /home/$DEPLOY_ENV_USER/serve"
- ssh $DEPLOY_ENV_USER@$DEPLOY_ENV_TARGET "rm -rf /home/$DEPLOY_ENV_USER/serve/*"
- rsync --progress -av -e ssh /workdir/build $DEPLOY_ENV_USER@$DEPLOY_ENV_TARGET:/home/$DEPLOY_ENV_USER/serve

Loading…
Cancel
Save