-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
51 lines (43 loc) · 1.04 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
language: node_js
node_js: stable
cache:
directories:
- node_modules
before_install:
- git config --global user.name "khs1994"
- git config --global user.email "[email protected]"
- export TZ='Asia/Shanghai'
- openssl aes-256-cbc -K $encrypted_023c3608ff03_key -iv $encrypted_023c3608ff03_iv
-in .travis/id_rsa.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- echo Host * > ~/.ssh/config
- echo ServerAliveInterval 60 >> ~/.ssh/config
- echo StrictHostKeyChecking no >> ~/.ssh/config
- echo UserKnownHostsFile /dev/null >> ~/.ssh/config
- ./bin/build.sh git
install:
- ls -la
#- npm install
- npm update
- npm run version
script:
- npm run clean
- npm run generate
# - npm run deploy
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t khs1994/blog .
- docker push khs1994/blog
deploy:
provider: pages
local-dir: public
github-token: $GITHUB_TOKEN
target-branch: master
skip-cleanup: true
on:
branch: hexo
branches:
only:
- hexo
addons:
ssh_known_hosts:
- code.aliyun.com