-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (42 loc) · 1.14 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
language: nix
script:
nix-shell utils.nix --run '
bundix;
' &&
test $(git ls-files -m | wc -l) -eq 0 &&
nix-shell shell.nix --pure --run '
set -e;
npm install;
gulp build:reader --prod;
gulp build:countdown --prod;
';
before_install:
- openssl aes-256-cbc -K $encrypted_c6117acbd9f6_key -iv $encrypted_c6117acbd9f6_iv
-in deploy_key.enc -out ~/.ssh/deploy_key -d
- chmod 600 ~/.ssh/deploy_key
- echo -e "Host $staging\n\tStrictHostKeyChecking no\n\tIdentityFile ~/.ssh/deploy_key\n" >> ~/.ssh/config
deploy:
skip_cleanup: true
provider: script
script:
rsync -azP public "$user@$staging:/home/$user" &&
ssh "$user@$staging" "bash --login -c '
set -e;
cd mmp;
git pull;
bundle install;
rm -rf public;
mv ../public .;
if [ -f var/run/puma.pid ]; then pumactl stop; fi;
if [ -S /tmp/puma.sock ]; then rm /tmp/puma.sock; fi;
'" &&
ssh "$user@$staging" '
set -e;
. /home/$user/.rvm/scripts/rvm;
cd mmp;
pumactl start > /tmp/puma-start 2>&1 &
sleep 30;
grep -C 10 "Daemonizing" /tmp/puma-start;
';
on:
branch: master