-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy path.travis.yml
44 lines (36 loc) · 912 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
language: node_js
sudo: false
node_js:
- "0.12"
cache:
apt: true
directories:
- node_modules
addons:
apt:
packages:
- graphicsmagick
ssh_known_hosts: github.com
before_install:
# Decrypt the private key
- openssl aes-256-cbc -K $encrypted_06b8e90ac19b_key -iv $encrypted_06b8e90ac19b_iv -in .travis/ssh_key.enc -out ~/.ssh/id_rsa -d
# Set the permission of the key
- chmod 600 ~/.ssh/id_rsa
# Start SSH agent
- eval $(ssh-agent)
# Add the private key to the system
- ssh-add ~/.ssh/id_rsa
# Copy SSH config
- cp .travis/ssh_config ~/.ssh/config
# Set Git config
- git config --global user.name "Hexo Bot"
- git config --global user.email [email protected]
# Clone the repository
- git clone https://github.com/hexojs/hexojs.github.io .deploy_git
install:
- npm install --no-optional
script:
- npm run build && hexo deploy
branches:
only:
- master