Skip to content
This repository was archived by the owner on Nov 4, 2019. It is now read-only.

Commit 29b50ac

Browse files
author
bananaapple
committed
Travis ci
1 parent bf62575 commit 29b50ac

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed

.travis.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language: node_js
2+
3+
node_js:
4+
- "0.12"
5+
before_install:
6+
# Decrypt the private key
7+
- openssl aes-256-cbc -K $encrypted_e4b94b4d5568_key -iv $encrypted_e4b94b4d5568_iv -in .travis/ssh_key.enc -out ~/.ssh/id_rsa -d
8+
# Set the permission of the key
9+
- chmod 600 ~/.ssh/id_rsa
10+
# Start SSH agent
11+
- eval $(ssh-agent)
12+
# Add the private key to the system
13+
- ssh-add ~/.ssh/id_rsa
14+
# Copy SSH config
15+
- cp .travis/ssh_config ~/.ssh/config
16+
# Set Git config
17+
- git config --global user.name "bananaappletw"
18+
- git config --global user.email [email protected]
19+
# Install Hexo
20+
- npm install hexo@beta -g
21+
# Clone the repository
22+
- git clone https://github.com/sqlab/sqlab.github.io .deploy
23+
24+
script:
25+
- hexo generate
26+
- hexo deploy
27+
28+
branches:
29+
only:
30+
- master
31+
32+

.travis/ssh_config

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Host github.com
2+
User git
3+
StrictHostKeyChecking no
4+
IdentityFile ~/.ssh/id_rsa
5+
IdentitiesOnly yes

.travis/ssh_key.enc

1.64 KB
Binary file not shown.

_config.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ titlecase: false # Transform title into titlecase
3434
external_link: true # Open external links in new tab
3535
filename_case: 0
3636
render_drafts: false
37-
post_asset_folder: false
37+
post_asset_folder: true
3838
relative_link: false
3939
future: true
4040
highlight:
@@ -68,4 +68,6 @@ theme: landscape
6868
# Deployment
6969
## Docs: http://hexo.io/docs/deployment.html
7070
deploy:
71-
type:
71+
type: git
72+
repo: [email protected]:SQLab/SQLab.github.io.git
73+

0 commit comments

Comments
 (0)