Skip to content

Commit

Permalink
update push_doc.sh to fix circleCI error
Browse files Browse the repository at this point in the history
  • Loading branch information
chyikwei committed Sep 11, 2018
1 parent 3a7b1fb commit 0df1c1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- attach_workspace:
at: doc/_build/html
- run: ls -ltrh doc/_build/html
- run: bash ci_scripts/circleci/push_doc.sh doc/_build/html
- run: bash ci_scripts/circleci/push_doc.sh

workflows:
version: 2
Expand Down
10 changes: 7 additions & 3 deletions ci_scripts/circleci/push_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ set -e

MSG="Pushing the docs for revision for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"

GENERATED_DOC_DIR=$1
GENERATED_DOC_DIR=$(readlink -f $GENERATED_DOC_DIR)
cd $HOME
# Copy the build docs to a temporary folder
rm -rf tmp
mkdir tmp
cp -R $HOME/$DOC_REPO/doc/_build/html/* ./tmp/


# Clone the docs repo if it isnt already there
cd $HOME
Expand Down Expand Up @@ -38,7 +42,7 @@ for name in $(ls -A $HOME/$DOC_REPO); do
done

# Copy the new build docs
cp -R GENERATED_DOC_DIR ./
cp -R $HOME/tmp/ ./

git config --global user.email $EMAIL
git config --global user.name $USERNAME
Expand Down

0 comments on commit 0df1c1f

Please sign in to comment.