add deploy script

This commit is contained in:
Yifan Gao 2017-01-24 00:58:47 +06:00
parent e3c4bb08f0
commit c9ba0fc910
2 changed files with 13 additions and 0 deletions

View File

@ -12,3 +12,10 @@ before_script:
- docker pull gaoyifan/bgpdump
script:
- ./generate.sh
deploy:
provider: script
script: ./upload.sh
skip_cleanup: true
on:
branch: master
condition: $TRAVIS_EVENT_TYPE == cron

6
upload.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
git remote set-url origin "https://${GITHUB_USERNAME}:${GITHUB_PASSWORD}@github.com/gaoyifan/china-operator-ip.git"
git add result
git commit -m "update `date +%Y-%m-%d`"
git push origin ${TRAVIS_BRANCH}