This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
/
.travis.yml
71 lines (71 loc) · 3.26 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
language: ruby
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- secure: lTpJ7845M8qM1jgibmChhQkBfKD/NqKmKdMmStZPyconvI2BuntDcC1tVl9+TSuBrh66TdVQWUUOYvXlT9Q/w7TFcUZmx67Or6VgEQIX2r3TTTUgSdtf0NmGxW3ylxVBeEvheRC0gYe/iyBP19ofcUOe2UJUaGJq3uF3+6SbopXLy8Jkof3gqNEVAXWALsR2XsnZ3wHucvQxGfkXXNuNXMBJrG1dMphzPHFvPIufXs35H+kuFlresETUnj8ZxHwd3yD1aSnW/WGvsa/fPBKOU4rvEaYYAURy7llgEF33zoRB1/tsSHI6Dr0Y2mw10faZfIrSh2H1glKTDtqcPVmtaDkiv1cTk8CluW94v/UIZz/rP3ylOjx+WVvr5nlzJpUb1Xlu9Ua5t3xRqxFpvbgRhwwdHnJnqSzLxd7FTcdCDGIhNbCH6RKSQQVo2eLncBh+jlfMtrj1v/monWLTU+8uYPvHmG0xQx9AtsjSR4GCduxizmKAIzvVgdTHTcWM4P6ihRB5tNLsxVmVxImxJfiMLrgu1en6jzZG7s1eVHSCCz9uUn0Us1sAZ2U2CM0LFeElYqJOfd3+/bUiNTIQXVhuiFSMS54FgiVaI813x+YCto7hHrN+FVYLECH5fLFYgCRmp+2ROUdMCt+O6o2d88ReREyBiuXkTz56CfCQml956J0=
addons:
ssh_known_hosts: newwww.rustycrate.ru
sudo: false
rvm:
- 2.2.3
before_script:
- . $HOME/.nvm/nvm.sh
- command -v nvm
- nvm install v8.11.1
- node --version
- npm --version
- npm install -g typograf
- npm install -g typograf-cli
- npm install -g eyo
- npm install -g yaspeller
- npm install -g markdownlint
- npm install -g markdownlint-cli
- typograf --version
- eyo --version
- yaspeller --version
- markdownlint --version
- bundle exec jekyll --version
- bundle exec htmlproofer --version
- convert -version
script:
- result=0;
for f in $(find _posts -name '*md'); do
if ! grep -qe '<!--cut-->' "$f"; then
echo "Missing cut in $f";
result=1;
fi;
if grep -q $'\xEF\xBB\xBF' "$f"; then
echo "Found BOM mark in $f. Please remove it because Jekyll doesn't support them.";
result=1;
fi;
done;
return $result;
- markdownlint --output markdownlint.issues *.md _posts/*.md || true;
[ -f markdownlint.issues ] && [ $(wc -l markdownlint.issues | cut -f 1 -d ' ') -le 2405 ];
rm markdownlint.issues;
- yaspeller --only-errors *.md _posts
- JEKYLL_ENV=production RUSTYCRATE_MODE=production RUSTYCRATE_ENABLE_EYO=yes
bundle exec jekyll build
- bundle exec htmlproofer ./_site
--log-level error --only-4xx --check-favicon --check-html --allow-hash-href
--url-ignore /crates.io/,/files.gitter.im/,/fonts.googleapis.com/,/www.quora.com/,/is.gd/,'/github.com\/ruRust\/rustycrate.ru\/edit\/master/','/github.com\/settings/',/gitter.im/,/www.rust-lang.org/,/blog.rust-lang.org/,/cdn.jsdelivr.net/
--file-ignore /yandex_6b9a121b20becc7c.html/,/googlea5495ce52829dd37.html/
after_success:
- if [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_BRANCH == "master" ]; then
openssl aes-256-cbc -K $encrypted_641cbba37704_key -iv $encrypted_641cbba37704_iv
-in travis.trash.id_ed25519.enc -out travis.trash.id_ed25519 -d;
tar -caf .site.tar.gz _site;
chmod 600 travis.trash.id_ed25519;
scp -i travis.trash.id_ed25519 .site.tar.gz "$DEPLOY_USER@$DEPLOY_HOST:";
ssh -i travis.trash.id_ed25519 -t $DEPLOY_USER@$DEPLOY_HOST "rm -rf _site && tar -xaf .site.tar.gz
&& /home/$DEPLOY_USER/deploy.sh";
fi;
after_script:
- if [ -f travis.trash.id_ed25519 ]; then shred -u travis.trash.id_ed25519; fi;
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/d88930bf78ef8a7cc139
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always