-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (45 loc) · 1.14 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
52
53
language: r
dist: xenial
latex: false
# Install the apt prerequisites
addons:
apt:
packages:
- python-pygments
# Handle git submodules yourself
git:
submodules: false
# Use sed to replace the SSH URL with the public URL, then initialize submodules
before_install:
- wget https://github.com/spf13/hugo/releases/download/v0.21/hugo_0.21_Linux-64bit.deb
- sudo dpkg -i hugo_0.21_Linux-64bit.deb
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
# Clean and don't fail
install:
- rm -rf public || exit 0
cache:
packages: yes
directories:
- $HOME/bin
# Build the website
script:
- Rscript -e 'install.packages(c("blogdown","knitr","GGally","ggplot2"))'
- Rscript -e 'blogdown::install_hugo()'
- Rscript -e 'blogdown::build_site()'
# - hugo
# Deploy to GitHub pages
deploy:
provider: pages
skip_cleanup: true
local_dir: public
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
target_branch: build
on:
branch: master
# fqdn: travis-blogdown.yihui.name
# Build all branches, *including* gh-pages:
branches:
only:
- gh-pages
- /.*/