-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
47 lines (36 loc) · 999 Bytes
/
.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
43
44
45
46
47
# we are building using jekyll and use ruby
language: ruby
rvm:
- 2.3.3
sudo: false
# do not clone the entire history -- no old versions are needed
git:
depth: 1
# but we need a few packages
addons:
apt:
packages:
- openssh-client
- rsync
install:
# make sure we have all we need
- which ssh-agent
- which rsync
# install github pages
- gem install github-pages
script:
# decrypt the ssh key
- openssl aes-256-cbc -K $encrypted_b757811672fc_key -iv $encrypted_b757811672fc_iv -in _deploy/id_rsa.enc -out _deploy/id_rsa -d
- chmod 600 _deploy/id_rsa
# Disable stricvt host key checking
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# start an ssh agent and add the key
- eval $(ssh-agent -s)
- ssh-add _deploy/id_rsa
# build site
- jekyll build -t _site
# rsync everything from _site/
- cd _site && rsync -rv -e "ssh -p 40000" --checksum ./ [email protected]:/root/data/ --delete
branches:
only:
- master