[Emacs] Avoid cloning so far ahead of time
This commit is contained in:
parent
fc07f901ed
commit
6358ccc6e7
@ -14,4 +14,4 @@ curl -fsSkL https://raw.github.com/cask/cask/master/go | python
|
|||||||
cask install
|
cask install
|
||||||
cask exec emacs --script generate-html.el
|
cask exec emacs --script generate-html.el
|
||||||
|
|
||||||
cp "$THIS_DIR/../dotfiles/emacs.d/README.html" out/index.html
|
mv "$THIS_DIR/../dotfiles/emacs.d/README.html" .
|
||||||
|
@ -5,6 +5,9 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
|
|
||||||
cd $THIS_DIR
|
cd $THIS_DIR
|
||||||
|
|
||||||
|
git config user.name "$COMMIT_AUTHOR_NAME"
|
||||||
|
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
||||||
|
|
||||||
set -e # Exit with nonzero exit code if anything fails
|
set -e # Exit with nonzero exit code if anything fails
|
||||||
|
|
||||||
SOURCE_BRANCH="master"
|
SOURCE_BRANCH="master"
|
||||||
@ -26,16 +29,6 @@ REPO=`git config remote.origin.url`
|
|||||||
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
||||||
SHA=`git rev-parse --verify HEAD`
|
SHA=`git rev-parse --verify HEAD`
|
||||||
|
|
||||||
# Clone the existing gh-pages for this repo into out/
|
|
||||||
# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
|
|
||||||
git clone $REPO out
|
|
||||||
cd out
|
|
||||||
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# Clean out existing contents
|
|
||||||
rm -rf out/**/* || exit 0
|
|
||||||
|
|
||||||
# Run our compile script
|
# Run our compile script
|
||||||
doCompile
|
doCompile
|
||||||
|
|
||||||
@ -50,10 +43,16 @@ chmod 600 deploy_key
|
|||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
ssh-add deploy_key
|
ssh-add deploy_key
|
||||||
|
|
||||||
# Now let's go have some fun with the cloned repo
|
# Clone the existing gh-pages for this repo into out/
|
||||||
|
# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
|
||||||
|
git clone $REPO out
|
||||||
cd out
|
cd out
|
||||||
git config user.name "$COMMIT_AUTHOR_NAME"
|
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
|
||||||
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
|
||||||
|
# Clean out existing contents
|
||||||
|
git ls-files | xargs rm -rf
|
||||||
|
|
||||||
|
mv ../README.html ./index.html
|
||||||
|
|
||||||
# Commit the "changes", i.e. the new version.
|
# Commit the "changes", i.e. the new version.
|
||||||
# The delta will show diffs between new and old versions.
|
# The delta will show diffs between new and old versions.
|
||||||
|
Loading…
Reference in New Issue
Block a user