Files
30-seconds-of-code/.travis/push.sh
Angelos Chalaris 979bfbd923 Update travis push
Most of the guides I can find use the travis email and name to differentiate from user commits. This will come in handy later down the line to filter out build commits more easily. I'm pretty certain this will not break anything, but I'd like someone to take a look at it before merging.
2017-12-22 10:53:42 +02:00

22 lines
502 B
Bash
Executable File

#!/bin/sh
setup_git() {
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
}
commit_website_files() {
git checkout master
git add *
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
}
upload_files() {
echo "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git"
git push --force "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" master > /dev/null 2>&1
}
setup_git
commit_website_files
upload_files