forked from nodegit/nodegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-docs.sh
More file actions
executable file
·34 lines (23 loc) · 864 Bytes
/
deploy-docs.sh
File metadata and controls
executable file
·34 lines (23 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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