travis: only deploy master
This commit is contained in:
@@ -9,13 +9,13 @@ script:
|
|||||||
- hugo
|
- hugo
|
||||||
|
|
||||||
after_success: |
|
after_success: |
|
||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
if [ -n "$GITHUB_TOKEN" ] && [ "$TRAVIS_BRANCH" -eq "master" ]; then
|
||||||
cd "$TRAVIS_BUILD_DIR"
|
cd "$TRAVIS_BUILD_DIR"
|
||||||
cd public
|
cd public
|
||||||
git init
|
git init
|
||||||
git checkout -b master
|
git checkout -b master
|
||||||
git add .
|
git add .
|
||||||
git -c user.name='cwpearson' -c user.email='carl.w.pearson@gmail.com' commit -m "push from hugo-cwpearson $TRAVIS_BRANCH $TRAVIS_COMMIT"
|
git -c user.name='cwpearson' -c user.email='carl.w.pearson@gmail.com' commit -m "push from hugo-cwpearson $TRAVIS_COMMIT"
|
||||||
# Make sure to make the output quiet, or else the API token will leak!
|
# Make sure to make the output quiet, or else the API token will leak!
|
||||||
# This works because the API key can replace your password.
|
# This works because the API key can replace your password.
|
||||||
git push -f -q https://cwpearson:$GITHUB_TOKEN@github.com/cwpearson/cwpearson.github.io master 2> /dev/null
|
git push -f -q https://cwpearson:$GITHUB_TOKEN@github.com/cwpearson/cwpearson.github.io master 2> /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user