-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy path.travis.yml
37 lines (36 loc) · 1.18 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
language: ruby
rvm:
- 2.7.1
script: bundle exec jekyll build
branches:
only:
- master
before_script:
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
after_success:
- mkdir .travis
- echo -e "$DEPLOY_KEY" > .travis/deploy_key.pem
- chmod 600 .travis/deploy_key.pem # this key should have push
- eval `ssh-agent -s` # Make sure ssh agent is working
- ssh-add .travis/deploy_key.pem
- rm -rf _deploy
- mkdir _deploy
- cd _deploy
- git clone https://github.com/opencompany/opencompany.github.io.git --branch=master .
- git remote add deploy [email protected]:opencompany/opencompany.github.io.git
- rsync -avzh ../_site/ ./
- git add .
- git config --global user.name "$GIT_NAME"
- git config --global user.email "$GIT_EMAIL"
- git commit -m "New site version. Committed by Travis-CI."
# - git config credential.helper "store --file=.git/credentials"
# - echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- git push deploy master
notifications:
irc:
on_success: change
on_failure: change
channels:
- irc.freenode.net##opencompany
template:
- '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}'