Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ after_success:
node-pre-gyp publish
fi

- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_OS_NAME == "linux" ] && [ $NODE_VERSION == "4.1" ]; then
.travis/deploy-docs.sh;
fi

notifications:
slack:
secure: KglNSqZiid9YudCwkPFDh+sZfW5BwFlM70y67E4peHwwlbbV1sSBPHcs74ZHP/lqgEZ4hMv4N2NI58oYFD5/1a+tKIQP1TkdIMuq4j2LXheuirA2HDcydOVrsC8kRx5XFGKdVRg/uyX2dlRHcOWFhxrS6yc6IxtxYWlRTD2SmEc=
Expand Down
34 changes: 34 additions & 0 deletions .travis/deploy-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash


# delete "nodegit.github.com" folder if it exists
rm -rf "nodegit.github.com" || exit 0;

# clone "nodegit.github.com" repository
git clone "https://github.com/nodegit/nodegit.github.com.git"

# change into "nodegit.github.com" folder
cd "nodegit.github.com"

# install node dependencies
npm install

# link "nodegit" folder
ln -s ../.. generate/nodegit

# generate new docs
node generate

# configure git user information
git config user.name "Travis CI"
git config user.email "noreply@travis-ci.org"

# commit changes
git add .
git commit -m "Deploy to GitHub Pages

see https://github.com/nodegit/nodegit.github.com/commit/${TRAVIS_COMMIT}"
git tag "${TRAVIS_COMMIT}"

# push to the "nodegit.github.com" repository
git push --quiet "https://${GH_TOKEN}@github.com/nodegit/nodegit.github.com.git" master "${TRAVIS_COMMIT}" > /dev/null 2>&1