-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.travis.yml
More file actions
46 lines (37 loc) · 1.1 KB
/
Copy path.travis.yml
File metadata and controls
46 lines (37 loc) · 1.1 KB
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
language: node_js
node_js:
- "0.12"
sudo: required
services:
- docker
env:
global:
- IMAGE_NAME: jamespan/blog
branches:
only:
- master
addons:
ssh_known_hosts:
- github.com
before_install:
- export TZ=Asia/Shanghai
- openssl aes-256-cbc -K $encrypted_3ba5678e770b_key -iv $encrypted_3ba5678e770b_iv -in .travis/travis.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- eval $(ssh-agent)
- ssh-add ~/.ssh/id_rsa
- git config --global user.name "panjiabang"
- git config --global user.email panjiabang@gmail.com
install:
- npm install --production
script:
- git ls-files | while read file; do touch -d $(git log --date=local -1 --format="@%ct" "$file") "$file"; done
- ./node_modules/hexo/bin/hexo g
- ./node_modules/hexo/bin/hexo d
# - cp .travis/Dockerfile ./Dockerfile
# - cp .travis/nginx.conf ./nginx.conf
# - docker build -t $IMAGE_NAME:latest .
# - docker tag $IMAGE_NAME:latest $IMAGE_NAME:$(date +%Y%m%d%H%M%S)
# - docker images
# after_success:
# - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
# - docker push $IMAGE_NAME