-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (34 loc) · 1.28 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
branches:
only:
- source
cache:
apt: true
env:
matrix:
- HUGO_VERSION="0.10"
global:
secure: Ul+muxBGBpq3Btjf5z1jZRqhjXGHT2fv3pQ9Pbm3+7MxHB/9krOlIYWAXKSbxzpddln8u5/ecHVfjV/zkMaVMRaItZy2jCQN15tk9fXfsSOR3Wm3HN8nnHSWJctB3p5E0eVwv3CDHtn/3y/X4vMKqEDlqd/G85eN1/XLBuEoKgI=
before_install:
- mkdir -p ${HOME}/temp
- cd ${HOME}/temp
- curl --compressed --create-dirs --location --remote-name --remote-time --retry 3 --show-error --url https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux_amd64.tar.gz
- tar -xzf hugo_${HUGO_VERSION}_linux_amd64.tar.gz
install:
- sudo mv hugo_${HUGO_VERSION}_linux_amd64/hugo_${HUGO_VERSION}_linux_amd64 /usr/local/bin/hugo
- sudo apt-get install python-pygments
- cd ${TRAVIS_BUILD_DIR}
- rm -Rf ${HOME}/temp
script:
- hugo -s .
after_success:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis-CI"
- git config --global push.default simple
- mkdir -p ${HOME}/temp
- cd ${HOME}/temp
- git clone --branch=master https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git ${TRAVIS_REPO_SLUG}
- cd ${TRAVIS_REPO_SLUG}
- mv ${TRAVIS_BUILD_DIR}/public/* .
- git add -A .
- git commit -m "Travis build ${TRAVIS_BUILD_NUMBER}"
- git push