Browse Source

ci

merge-requests/3/merge
rozetko 2 years ago
parent
commit
17ad32daa5
  1. 22
      .gitlab-ci.yml

22
.gitlab-ci.yml

@ -0,0 +1,22 @@
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
Loading…
Cancel
Save