forked from UtkarshVerma/hugo-dream-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
executable file
·51 lines (48 loc) · 1.76 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
matrix:
include:
- name: Hugo Min Cards
env:
- latest=false
- config=cards.toml
- name: Hugo Min Posts
env:
- latest=false
- config=posts.toml
- name: Hugo Latest Cards
if: type=push
env:
- latest=true
- config=cards.toml
- name: Hugo Latest Posts
if: type=push
env:
- latest=true
- config=posts.toml
exclude:
- env: latest=true
if: type=pull_request
env:
global:
- minVer=0.55.0
- HUGO_THEME=hugo-dream-plus
- secure: IusPAufa/6b4s3ALbBHKWrY7S0P/u+9R0HjGl9Ta9sue3DIgVtxM9AQWVnfWN3Pf9WKSRDfGsR4X8KN5DrcLe2grt1k9N2ecUSFoHuAdJCP4MKiW0Y+COEb779LFS8t/wzXwoN1chbUXjdwhQQTq6WxG2mvP20KIaRmXQdpwxj1bTmtVlekeybOfn6HSohJzoCkwviGiTTIT7g0hDwafErid2kWFToEZdhYO0clbKb/H/QElyPdHhBUw/a51+4nTpgJvuahNDuvegPobcJcVukj1xYL7OExdYq8HEhIZDLkZe8GnmHaxIfdfmdEJLoQgU7QBCH/Sw8+5Vz7QLbwIgYG+gYpjTLxAidCZmzt6uH/Z4xu8eNWw+EzpVzqR53kbalLv1MatqYfLOhev8KZ7i4MvEeDJS7nl847Dhnv034q7Ua25QfdRnR3Z17PigwWk3Vqdw6s8RxQN5uEm+z0dzwRkijNnBxyqas7NCggPS5pD01GhflH/QyX9XA40LspPGGLlhWimIXd+ckeDbqBETGjUiebFjCeDHSMTNev+iQNoF+4cF9Z3NqXObR0zaobu1rLHjROWvKb0XuhZBijTzfpTBqAQW0Xvj/NYXVa9aF471lAm51qPSQLcIKnjT9g1F++cRBn90lY0QrqqDmWZxAGztlm7ugzPmpWQKo/wVUs=
install:
- rm -rf public || exit 0
- mkdir ~/_bin
- hugoLink="https://api.github.com/repos/gohugoio/hugo/releases"
- regex="/hugo_[0-9].[0-9]*.*[0-9]_Linux-64bit.tar.gz"
- >
if [ $latest == 'true' ]; then
link=$(curl -s -u UtkarshVerma:"$GITHUB_TOKEN" "${hugoLink}/latest" | grep "$regex" | cut -d\" -f4)
else
link="https://github.com/gohugoio/hugo/releases/download/v${minVer}/hugo_${minVer}_Linux-64bit.tar.gz"
fi
- echo $link
- wget $link -O hugo.tgz
- tar xfv hugo.tgz -C ~/_bin
- rm hugo.tgz ~/_bin/*.md
- export PATH=$HOME/_bin:$PATH
script:
- hugo version
- cd exampleSite
- hugo --config $config