forked from yesodweb/yesodweb.com-content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (39 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
language: c
sudo: false
cache:
directories:
- $HOME/.stack
addons:
apt:
packages:
- asciidoc
- ghc-7.10.3
sources:
- hvr-ghc
install:
- export PATH=$HOME/.local/bin:/opt/ghc/7.10.3/bin:$PATH
- mkdir -p $HOME/.local/bin
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
script:
- rm -f book/generated-xml/*
- book/tools/generate.sh
- book/tools/validate.hs
- git diff
- |
if [ $TRAVIS_PULL_REQUEST != false ]
then
echo Not pushing diff for a pull request
elif [ -n "$(git status --porcelain)" ]
then
mkdir -p $HOME/.ssh
openssl aes-256-cbc -K $encrypted_92ac0cbbb1f3_key -iv $encrypted_92ac0cbbb1f3_iv -in id_rsa.enc -out id_rsa -d
mv id_rsa $HOME/.ssh
chmod 400 $HOME/.ssh/id_rsa
git config --global user.email "[email protected]"
git config --global user.name "Travis job for yesodweb/yesodweb.com-content"
git add -A
git commit -m "Travis auto-generate XML files, $(date --utc --iso=sec)"
git push [email protected]:yesodweb/yesodweb.com-content.git HEAD:$TRAVIS_BRANCH
else
echo No changes present
fi