use github personal access tokens for CI deploy

This commit is contained in:
Yifan Gao 2017-03-07 22:43:31 +08:00
parent 14e46088a9
commit e6ab4095b0

View File

@ -1,6 +1,12 @@
#!/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 $(git rev-parse HEAD):${TRAVIS_BRANCH}
git config user.name $GIT_USER_NAME
git config user.email $GIT_USER_EMAIL
git clone -b ip-lists https://${GH_REF} ip-lists
mv result/* ip-lists
cd ip-lists
git add .
git commit -m "update $(date +%Y-%m-%d)"
git push -q "https://${GH_TOKEN}@${GH_REF}" ip-lists:ip-lists