-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
49 lines (49 loc) · 1.31 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
43
44
45
46
47
48
49
sudo: false
language: ruby
rvm:
- 2.5.5
- 2.6.2
- ruby-head
env:
- RUBY_VERSION_FOR_DEPLOY=2.6.2
branches:
only:
- master
cache:
bundler: true
directories:
- vendor/bundle
- $HOME/.rvm
before_install:
- openssl aes-256-cbc -K $encrypted_9c5355402a97_key -iv $encrypted_9c5355402a97_iv
-in deploy_key.enc -out ./deploy_key -d
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host $SERVER_IP_ADDRESS\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
- ssh -i ./deploy_key $USER@$SERVER_IP_ADDRESS -p $PORT pwd
install:
- travis_retry gem update --system
- travis_retry gem install bundler
- travis_retry bundle install
- travis_retry bundle update
- rake list:companies_id_ruby
- bundle exec jekyll build
after_success:
- test $TRAVIS_BRANCH = "master" && test $TRAVIS_RUBY_VERSION = $RUBY_VERSION_FOR_DEPLOY &&
git clone $REMOTE_FOR_DEPLOY repository && rm -rf repository/* && cp _site/* repository -R &&
cd repository && git add --all && git commit -m "Deploy!" &&
git push origin master
deploy:
provider: pages
skip-cleanup: true
keep-history: true
github-token: $GITHUB_TOKEN
local-dir: _site
target-branch: gh-pages
fqdn: rails.id
on:
branch: master
rvm: $RUBY_VERSION_FOR_DEPLOY
notifications:
email: false