Skip to content

Commit afc4b64

Browse files
authored
Merge pull request #35 from CrutchAndBike/auto-deploy
Настроил автодэплой если установить тэг с версией
2 parents e7f8d03 + a1647c7 commit afc4b64

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
language: node_js
22
node_js:
3-
- "10"
3+
- '10'
44
script:
5-
- npm run test
6-
- npm run build
5+
- npm run test
6+
- npm run build
7+
- bash deploy.sh
8+
before_install:
9+
- openssl aes-256-cbc -K $encrypted_96d2ef8ea208_key -iv $encrypted_96d2ef8ea208_iv
10+
-in deploy_rsa.enc -out deploy_rsa -d
11+
addons:
12+
ssh_known_hosts: 217.23.138.53

deploy.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# !/bin/bash
2+
REGEXP='v([0-9]+\.[0-9]+)'
3+
if [[ $TRAVIS_TAG =~ $REGEXP ]];
4+
then
5+
eval "$(ssh-agent -s)"
6+
chmod 600 deploy_rsa
7+
ssh-add deploy_rsa
8+
ssh -a $USER@$HOST "
9+
rm -rf split-view
10+
git clone --depth=50 --branch=$TRAVIS_TAG https://github.com/CrutchAndBike/split-view.git
11+
cd split-view
12+
~/.nvm/versions/node/v11.3.0/bin/npm ci
13+
~/.nvm/versions/node/v11.3.0/bin/npm run build
14+
exit
15+
"
16+
fi

deploy_rsa.enc

3.31 KB
Binary file not shown.

0 commit comments

Comments
 (0)