-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
34 lines (33 loc) · 1.08 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
language: node_js
node_js:
- "lts/*"
branches:
only:
- master
before_install:
- npm install -g hexo
install:
- npm install
before_script:
- git config --global user.name 'tealinuxos via Travis CI'
- git config --global user.email '[email protected]'
script:
- hexo clean
- hexo generate
after_success:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then mkdir .deploy; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd .deploy; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git init; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git remote add origin $DEPLOY_REPO; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cp -r ../public/* .; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add -A .; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git commit -m 'Site updated'; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git push --force --quiet origin master; fi
# - mkdir .deploy
# - cd .deploy
# - git init
# - git remote add origin $DEPLOY_REPO
# - cp -r ../public/* .
# - git add -A .
# - git commit -m 'Site updated'
# - git push --force --quiet origin master