-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
45 lines (43 loc) · 1.17 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
language: node_js
node_js:
- node
sudo: required
dist: trusty
branches:
only:
- master
before_install:
# 安装编译依赖
- sudo pip install Pygments
- sudo pip install pygments-lexer-solidity
install:
- mkdir work
- wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb
-O $PWD/work/hugo.deb
- sudo dpkg -i $PWD/work/hugo.deb
- npm install
before_deploy:
- grunt build
# 解密
- openssl aes-256-cbc -K $encrypted_98e3fd917d2e_key -iv $encrypted_98e3fd917d2e_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d
# 将私钥加入环境
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
deploy:
- provider: pages
skip-cleanup: true
local-dir: public
github-token: "$GH_TOKEN"
- provider: script
skip_cleanup: true
script: rsync -r --delete-after --progress --quiet -e 'ssh -o StrictHostKeyChecking=no -p $DEPLOY_SSH_PORT' $TRAVIS_BUILD_DIR/$SOURCE_DIR/ $DEPLOY_SSH_USER@$DEPLOY_HOST:$HOME/www/ethereumhelp/
on:
branch: master
env:
global:
- REPO="github.com/mochain/ethereumhelp.git"
- USER="ysqi"
- EMAIL="[email protected]"
- SOURCE_DIR="public"
- DEPLOY_BRANCH="gh-pages"