Last active
April 28, 2016 15:39
-
-
Save msis/b73112ba396df4b6f1c0a9ac6c122ce5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mohamed Saad Ibn Seddik | |
set -e # exit with nonzero exit code if anything fails | |
# go to the out directory | |
cd ${DEPLOY_DIR} || exit 1 | |
# initiate new git repo inside the new deploy folder | |
git init | |
# sets the configuration for the push | |
git config user.name "Travis CI" | |
git config user.email "${GIT_EMAIL}" | |
# adds the new directory | |
git add . | |
git commit -m "Build number: ${TRAVIS_BUILD_NUMBER}, from commit: ${TRAVIS_COMMIT}." | |
# forces the push to remote | |
git push --force --quiet "https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}" master:gh-pages > /dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mohamed Saad Ibn Seddik | |
set -e # exit with nonzero exit code if anything fails | |
# go to the out directory | |
cd ${DEPLOY_DIR} || exit 1 | |
# initiate new git repo inside the new deploy folder | |
git init | |
# sets the configuration for the push | |
git config user.name "Travis CI" | |
git config user.email "${GIT_EMAIL}" | |
# adds the new directory | |
git add . | |
git commit -m "Build number: ${TRAVIS_BUILD_NUMBER}, from commit: ${TRAVIS_COMMIT}." | |
# forces the push to remote | |
git push --force --quiet "https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}" master:master > /dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment