Skip to content

Commit

Permalink
actually build docs without failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI authored and tomocchino committed Dec 2, 2016
1 parent 7ba88ca commit a1aa2f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
cache_directories:
- docs/vendor/bundle
- .grunt # Show size comparisons between builds
- $HOME/react-gh-pages # docs checkout

test:
override:
Expand Down
24 changes: 13 additions & 11 deletions scripts/circleci/build_gh_pages.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,27 @@ if [ -z $CI_PULL_REQUEST ] && [ "$CIRCLE_BRANCH" = "$REACT_WEBSITE_BRANCH" ]; th
git config --global user.email "travis@reactjs.org"

This comment has been minimized.

Copy link
@worawit15379

worawit15379 Nov 7, 2017

Tommy

# TODO: check if directory exists (restored from cache)
# if [ -d $GH_PAGES_DIR ]
# pushd $GH_PAGES_DIR
# git pull origin gh-pages
# popd
# else
# clone
# fi
git clone --branch gh-pages --depth=1 \
https://zpao@github.com/zpao/react.git \
$GH_PAGES_DIR
if [ -d $GH_PAGES_DIR ]; then
pushd $GH_PAGES_DIR
git pull origin gh-pages
popd
else
git clone --branch gh-pages --depth=1 \
https://zpao@github.com/zpao/react.git \
$GH_PAGES_DIR
fi

pushd docs
bundle exec rake release
cd $GH_PAGES_DIR
git status
git diff
git --no-pager diff
if ! git diff-index --quiet HEAD --; then
git add -A .
git commit -m "Rebuild website"
git push origin gh-pages
fi
popd
else
echo "Not building website"
fi

0 comments on commit a1aa2f9

Please sign in to comment.