forked from CenterForOpenScience/ember-osf-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d52674e
commit 99edb75
Showing
3 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set +x | ||
echo "${DEPLOY_KEY}" | base64 --decode > deploy_key | ||
chmod 600 deploy_key | ||
eval $(ssh-agent -s) | ||
ssh-add deploy_key | ||
rm deploy_key | ||
set -x | ||
|
||
REPO=$(git config remote.origin.url) | ||
SSH_REPO="${REPO/https:\/\/github.com\//git@github.com:}" | ||
SHA=$(git rev-parse --verify HEAD) | ||
|
||
cd dist/ | ||
git init | ||
git remote add origin "${SSH_REPO}" | ||
git checkout -b "${TARGET_BRANCH}" | ||
git config user.name "Travis CI" | ||
git config user.email "${COMMIT_AUTHOR_EMAIL}" | ||
git add . | ||
git commit -m "Deploy to GitHub Pages: ${SHA}" | ||
git push --force origin ${TARGET_BRANCH} |