-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 1.01 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
language: node_js
node_js:
- '10'
cache: npm
branches:
only:
- master
before_install:
- export TZ='Asia/Shanghai'
- npm install -g hexo-cli
install:
- git clone https://${GIT_TOKEN}@github.com/ruesin/hexo ./.hexo
- cd .hexo
- npm install
before_script:
- rm -rf ./source/_posts/ ./source/images/
- mkdir -p ./source/_posts/ && mkdir -p ./source/images/
- cp -r ../docs/* ./source/_posts/ && cp -r ../images/* ./source/images/
- cp ../CNAME ./source/
- cp ../favicon.ico ./source/
- echo $SHELL
script:
- hexo clean
- hexo generate
after_script:
- cd public
- git init
- git config user.name "ruesin"
- git config user.email "[email protected]"
- git remote add origin https://github.com/ruesin/notes.git
- git add .
- git commit -m "Travis CI Auto Builder at `date +"%Y-%m-%d %H:%M"`"
- git push --force --quiet "https://${GIT_TOKEN}@github.com/ruesin/notes.git" master:gh-pages
# - git push --force --quiet "https://${GIT_TOKEN}@github.com/ruesin/ruesin.github.io.git" master:master