-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (28 loc) · 964 Bytes
/
.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
language: go
go: master
branches:
only:
- master
before_install:
- git config --global user.name "${GITHUB_NAME}"
- git config --global user.email "${GITHUB_EMAIL}"
install:
- wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb
- sudo dpkg -i hugo*.deb
before_script:
- git clone "https://github.com/${SOURCE_REPO}" ${SOURCE_FOLDER}
- git clone "https://github.com/${WEBSITE_REPO}" ${WEBSITE_FOLDER}
script:
- cd ${SOURCE_FOLDER}
- hugo -d ${WEBSITE_FOLDER} --cleanDestinationDir
after_success:
- cd ${WEBSITE_FOLDER}
- cp ${SOURCE_FOLDER}/README.md README.md && cp ${SOURCE_FOLDER}/CNAME CNAME
- git add .
- git commit -m "Generated by Travis CI [Build#${TRAVIS_BUILD_NUMBER}]"
- git push --quiet "https://${GITHUB_TOKEN}@github.com/${WEBSITE_REPO}" ${TARGET_BRANCH}
env:
global:
- TARGET_BRANCH=master
- SOURCE_FOLDER=~/crup-source
- WEBSITE_FOLDER=~/crup-hugo