You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
569 B

image: node:14
stages:
- deploy
deploy:
stage: deploy
image: node:14
before_script:
- apt -y update && apt -y install rsync
script:
- eval "$(ssh-agent -s)"
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan "$SSH_HOST" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- yarn install && npm run build
- rsync -crvz --stats --chown='gitlab-deploy:gitlab-deploy' --include="dist/***" --exclude="*" . "$SSH_USER"@"$SSH_HOST":"$PLUGIN_PATH"
when: manual