-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic building of docs through travis
- Loading branch information
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
# Push HTML files to gh-pages automatically. | ||
|
||
# Fill this out with the correct org/repo | ||
ORG=AthenaEPI | ||
REPO=dmipy | ||
# This probably should match an email for one of your users. | ||
EMAIL=demian.wassermann@inria.fr | ||
|
||
set -e | ||
|
||
# Clone the gh-pages branch outside of the repo and cd into it. | ||
cd .. | ||
git clone -b gh-pages "https://$GH_TOKEN@github.com/$ORG/$REPO.git" gh-pages | ||
cd gh-pages | ||
|
||
# Update git configuration so I can push. | ||
if [ "$1" != "dry" ]; then | ||
# Update git config. | ||
git config user.name "Travis Builder" | ||
git config user.email "$EMAIL" | ||
fi | ||
|
||
# Copy in the HTML. You may want to change this with your documentation path. | ||
cp -R ../$REPO/_build/html/* ./ | ||
|
||
# Add and commit changes. | ||
git add -A . | ||
git commit -m "[ci skip] Autodoc commit for $COMMIT." | ||
if [ "$1" != "dry" ]; then | ||
# -q is very important, otherwise you leak your GH_TOKEN | ||
git push -q origin gh-pages | ||
fi |