rozetko
3 years ago
1 changed files with 22 additions and 0 deletions
@ -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…
Reference in new issue