forked from JimmyLv/jimmylv.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (59 loc) · 1.9 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
50
51
52
53
54
55
56
57
58
59
60
branches:
only:
- master
language: node_js
cache:
bundler: true
directories:
- node_modules # NPM packages
node_js:
- stable
before_install:
# 安装 ruby 环境
- rvm install 2.1.5
- gem install bundler
- openssl aes-256-cbc -K $encrypted_68227d46cd32_key -iv $encrypted_68227d46cd32_iv -in .travis/id_rsa.enc -out ~/.ssh/id_rsa -d
# 改变文件权限
- chmod 600 ~/.ssh/id_rsa
# 配置 ssh
- eval $(ssh-agent)
- ssh-add ~/.ssh/id_rsa
- cp .travis/ssh_config ~/.ssh/config
# 配置 git 信息
- git config --global user.name 'Travis CI'
- git config --global user.email [email protected]
- git clone --depth=1 --branch=master https://github.com/JimmyLv/jekyll-blog.git
# 配置 qshell
- wget http://devtools.qiniu.com/qshell-v2.0.5.zip
- sudo apt-get install unzip
- unzip qshell-*.zip
- ./qshell_linux_amd64 account $QiNiuAK $QiNiuSK
install:
- npm install nodeppt -g
script:
- nodeppt generate ./演讲 ./slides -a
- cd jekyll-blog
- git clone --depth=1 --branch=master https://github.com/JimmyLv/jimmylv.github.io.git _posts
- ls
- bundle install
- jekyll build
# - gem install jekyll jekyll-paginate jekyll-sitemap jekyll-tagging-related_posts jekyll-seo-tag
- cat ./public/css/base.css # just for verify changes
- ../qshell_linux_amd64 qupload scripts/qiniu.conf.json
after_success:
- |
cd _site
touch .nojekyll
git init
git add .
git commit -m "Deploy at `date +"%Y-%m-%d %H:%M"`"
# Make sure to make the output quiet, or else the API token will leak!
git push -f -q [email protected]:jimmylv/note-blog.git master:master > /dev/null 2>&1
- |
cd ../../slides
touch .nojekyll
git init
git add .
git commit -m "Deploy at `date +"%Y-%m-%d %H:%M"`"
# Make sure to make the output quiet, or else the API token will leak!
git push -f -q [email protected]:jimmylv/lecture.git master:master > /dev/null 2>&1