Skip to content

Commit

Permalink
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -16,5 +16,5 @@ env:
- DOCS_DIR: "../yeoman-generator-doc"
- GH_OWNER: yeoman
- GH_PROJECT_NAME: generator
- PACKAGE_NAME: yeoman-generator
- DEPLOY_ON_NODE_VERSION: v6
- secure: Hv7gACQoYGtesz1NTJYRHjGCimEJEjj4bQP2iTpDUUbfAiYe/4QPemoyDEFjRxbu5m2uoYwMk0AQrW7DnQhNAhl7u24jYnRgQyd/2GOx3xZgjwnao27gsrTHss4IyXEaS2h3kRuIVSD+xibz/lwZm+erHOQ9VOwvCQkOKnILXW8=
20 changes: 11 additions & 9 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -7,7 +7,13 @@ REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
SHA=`git rev-parse --verify HEAD`

# Pull Only build and deploy docs when the current build is for a Git tag.
# Only build and deploy docs on a specific node version
if [[ $TRAVIS_NODE_VERSION != $DEPLOY_ON_NODE_VERSION ]]; then
echo "Current Node.js versions doesn’t match. Skipping generating and deploying the docs."
exit 0
fi

# Only build and deploy docs when the current build is for a Git tag.
if [[ $TRAVIS_TAG == "" ]]; then
echo "Not a build for a Git tag. Skipping generating and deploying the docs."
exit 0
@@ -40,20 +46,16 @@ echo -e "Generated docs\n"
# Change directory to $DOCS_DIR
cd $DOCS_DIR

# Flatten content of $DOCS_DIR
mv $PACKAGE_NAME/**/** ./
rm -rf $PACKAGE_NAME

# Git setup
git config user.name $COMMIT_AUTHOR_NAME
git config user.email $COMMIT_AUTHOR_EMAIL

# Exit if there are no changes to the generated content
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the output on this run; exiting."
exit 0
fi

# Git setup
git config user.name $COMMIT_AUTHOR_NAME
git config user.email $COMMIT_AUTHOR_EMAIL

# Commit the new of the new version
git add --all .
git commit -m "Deploy docs to GitHub Pages ($TRAVIS_TAG)"
8 changes: 1 addition & 7 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -5,13 +5,7 @@
},
"opts": {
"recurse": true,
"destination": "../yeoman-generator-doc/",
"package": "package.json"
},
"templates": {
"default": {
"includeDate": false
}
"destination": "../yeoman-generator-doc"
},
"plugins": [
"plugins/markdown"

0 comments on commit 102dd97

Please sign in to comment.