This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
87 lines (79 loc) · 3.74 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
language: ruby
rvm:
- 2.3.3
sudo: false
addons:
apt:
packages:
- libjpeg-dev
- libpng-dev
- libgif-dev
- optipng
#- libtiff-dev webp can't convert tiff images without this
# Disallowing packages: libtiff-dev
# If you require these packages, please review the package approval process at: https://github.com/travis-ci/apt-package-whitelist#package-approval-process
# Install newer libwebp and imagemagick
before_install:
# Update PATH so that travis can find newer imagemagick
- export PATH=$HOME/opt/bin:$PATH
# Checks if Imagemagick is already sufficient version
# If not installs it from the sources
- convert -version | grep $IMAGEMAGICK_VERSION || {
export CORES=$(nproc) &&
echo "Using $CORES cores for compiling..." &&
cd /tmp &&
curl -L -O https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP_VERSION.tar.gz &&
tar xzf libwebp-$LIBWEBP_VERSION.tar.gz &&
curl -L -O https://github.com/ImageMagick/ImageMagick/archive/$IMAGEMAGICK_VERSION.tar.gz &&
tar xzf $IMAGEMAGICK_VERSION.tar.gz &&
cd libwebp-* &&
./configure --prefix=$HOME/opt &&
make -j$CORES &&
make install -j$CORES &&
cd /tmp/ImageMagick* &&
./configure --prefix=$HOME/opt &&
make -j$CORES &&
make install -j$CORES &&
$HOME/opt/bin/convert -version | grep $IMAGEMAGICK_VERSION &&
cd $TRAVIS_BUILD_DIR; }
# Update library paths for programs
- export LD_FLAGS=-L$HOME/opt/lib
- export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$HOME/opt/lib
- export CPATH=$CPATH:$HOME/opt/include
install:
- bundle install
- npm install --silent
- cp -r node_modules/font-awesome/fonts/* fonts/
- cp -r node_modules/open-sans-fontface/fonts fonts/open-sans
- ./node_modules/webpack/bin/webpack.js
script:
- bundle exec jekyll build --config _config.yml,_config/production.yml
# Minify all included .css files
- find _site/* -type f -name "*.css" | while read filename; do ./node_modules/clean-css/bin/cleancss --s0 --skip-rebase $filename -o /tmp/minified.css && cp /tmp/minified.css $filename; done
# Minify all included .js files
- find _site/* -type f -name "*.js" | while read filename; do ./node_modules/uglify-js/bin/uglifyjs $filename -o /tmp/minified.js && cp /tmp/minified.js $filename; done
# Sometimes there has been random timeout errors on external domains so skip those checks
- bundle exec htmlproofer ./_site --check-opengraph --check-favicon --disable-external --internal-domains $SITE_DOMAIN --check-html --file-ignore /amp/
# Check AMP pages too
- ./node_modules/amphtml-validator/index.js _site/amp/**/*.html
cache:
bundler: true
npm: true
directories:
- "$TRAVIS_BUILD_DIR/node_modules"
- "$HOME/opt"
env:
global:
- IMAGEMAGICK_VERSION: '7.0.3-10'
- LIBWEBP_VERSION: '0.5.1'
#- NOKOGIRI_USE_SYSTEM_LIBRARIES: true
- SITE_DOMAIN: keksi.io
- GIT_COMMIT_EMAIL: bot@keksi.io
- GIT_COMMIT_USER: Keksi Labs Bot
- secure: rsmW9ORbZAjdbFzztqJj9PTteYHGXdr8S69llewLCYdAkF3/129NBx4QHCWWDSmXh2LeXlfpdHH/u+uKws3+pA2XXzEjX1r8H9IwUcCl6CppMvPwZWT/BPDtGw3mmR8YivlQPkxwLEoY5KTsOuh8SAjgEk0jO5ZM3gyb3l/bVR1DWd0n0W/FRTc5zoR8ZWHKFRdoJa41tMq4CZ2udoOySuP/K6g8pvVQ+IlNpUfa3PbX/Ob9Cd8bLyRTm5hDc7tDPrDAyI87M5NNu0l1Qyj6mQCuFH3ozixrytRlLGftD6sYaCsTHef0+AdwyQaZGK2YBSx7Gikx1QWjE9vdHonU5dUNEOb1mkA8qZ++lGty3odXufGQvFM+7cI7cI6iq77C9LrIwxzSnVjihG62XzXn8Z02yqj/0+v2Of/uKU1+Q7jlzZM0fKWEfpCK+DMQh2qpRamKvpb//hxyAkqy5TXyzVEAdoT4mZ6SZnLRZtyXY2XrcpKrvYnfCkiy2huBIMdYQDSxV9YsG6/tyTaaQuWwkCQy8Cs9SLMqEhA3vbFDWh/kvrwAXf/+CSh1S40dtQFjVzDYSbFklzx6clqZNUO0CSu0qiFNzD9IQeNxcoJLyHx39I5zSOn9+XNlraP7XM8vHEX4RgwVa3xx7ib65SUzSTyDFpihhkxYJWjSkYEchBU=
deploy:
skip_cleanup: true
provider: script
script: _scripts/travis-deploy-to-gh-pages.sh
on:
branch: master