forked from trufflesuite/trufflesuite.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (40 loc) · 1.03 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
env:
global:
- GIT_NAME: "'Travis Deployer'"
- GIT_EMAIL: [email protected]
- GH_REF: [email protected]:trufflesuite/trufflesuite.github.io.git
- MASTER: "master"
language: node_js
node_js:
- "6.9.1"
before_script:
- >
if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "$TRAVIS_BRANCH" = "${MASTER}" ];
then
openssl aes-256-cbc -K $encrypted_cd76ef53e71c_key -iv $encrypted_cd76ef53e71c_iv -in deploy-key.enc -out deploy-key -d
chmod 600 deploy-key
eval `ssh-agent -s`
ssh-add deploy-key
git config user.name "${GIT_NAME}"
git config user.email "${GIT_EMAIL}"
git clone "${GH_REF}" build
fi
script:
- >
if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "$TRAVIS_BRANCH" = "${MASTER}" ];
then
mv build/.git .git-backup
npm run build
mv .git-backup build/.git
else
npm run build
fi
after_success:
- >
if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "$TRAVIS_BRANCH" = "${MASTER}" ];
then
cd build
git add -A
git commit -m "Update build artifacts"
git push origin master
fi