Skip to content

Instantly share code, notes, and snippets.

@msis
Last active April 28, 2016 15:39
Show Gist options
  • Save msis/b73112ba396df4b6f1c0a9ac6c122ce5 to your computer and use it in GitHub Desktop.
Save msis/b73112ba396df4b6f1c0a9ac6c122ce5 to your computer and use it in GitHub Desktop.
#!/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
#!/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