forked from sbpp/sbpp.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (41 loc) · 985 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#Use the new container-based infrastructure
sudo: false
language: go
#Install the apt prerequisites
addons:
apt_packages:
- python-pygments
#Set the build environment
env:
- HUGOV=0.59.1
#Clean and don't fail
install:
- rm -rf public || exit 0
#Download Hugo
before_script:
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
- npm i -g grunt-cli
- npm i -g yarn
- yarn
- grunt content-index
- mkdir binaries
- wget "https://github.com/gohugoio/hugo/releases/download/v${HUGOV}/hugo_${HUGOV}_Linux-64bit.tar.gz" -O binaries/hugo_${HUGOV}_Linux-64bit.tar.gz
- cd binaries
- tar -xzf hugo_${HUGOV}_Linux-64bit.tar.gz
- chmod +x hugo
- cd ..
#Build the website
script:
- binaries/hugo --minify
#Deploy to GitHub pages
deploy:
provider: pages
skip_cleanup: true
local_dir: public
github_token: $GITHUB_TOKEN
keep-history: true
fqdn: sbpp.dev
target-branch: master
on:
branch: src