-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (30 loc) · 1.05 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
# https://docs.travis-ci.com/user/deployment/pages/
# https://docs.travis-ci.com/user/languages/python/
install:
- uname -a
- wget https://github.com/gohugoio/hugo/releases/download/v0.60.0/hugo_0.60.0_Linux-64bit.deb
- sudo dpkg -i hugo*.deb
- hugo version
- pwd
script:
- hugo
- echo 'Hugo build done!'
after_script:
- git clone "https://lovexiaoliu:${GithubToken}@${Github_REF}" github-pages
- rm github-pages/* -rf
- cp ./public/* github-pages -rf
- cd github-pages
- echo www.20190929.cn >> CNAME # domain
- git add .
- git commit -m "Update Blog By TravisCI With Build $TRAVIS_BUILD_NUMBER"
- git tag v0.0.$TRAVIS_BUILD_NUMBER -a -m "Auto Taged By TravisCI With Build $TRAVIS_BUILD_NUMBER"
# Github Pages
- git push --force --quiet "https://lovexiaoliu:${GithubToken}@${Github_REF}" master:master
- git push --quiet "https://lovexiaoliu:${GithubToken}@${Github_REF}" master:master --tags
env:
global:
# Github Pages
- Github_REF: github.com/lovexiaoliu/lovexiaoliu.github.io.git
branches:
only:
- master