diff --git a/upload.sh b/upload.sh index 38418010..dab55c39 100755 --- a/upload.sh +++ b/upload.sh @@ -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 +