Skip to content

Commit

Permalink
updates the docs build script and travis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadtalasila committed Dec 4, 2017
1 parent 48a4606 commit 3226191
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
@@ -1,8 +1,16 @@
language: node_js
node_js:
- "8"
before_script:

install:
- npm install

script:
- npm test
- bash script/docs_auto_deploy.sh

deploy:
skip_cleanup: true
provider: script
script: bash script/docs_auto_deploy.sh
on:
branch: master
1 change: 1 addition & 0 deletions index.js
@@ -1,5 +1,6 @@
#!/usr/bin/env node
/**
* <h3>This module is the launch point for the autolabcli application</h3>
* <h3>Module imports functions from other modules and calls them when user inputs the required input </h3>
* @module index
*/
Expand Down
12 changes: 3 additions & 9 deletions script/docs_auto_deploy.sh
Expand Up @@ -40,28 +40,22 @@ git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
cd ..

# Clean out existing contents
rm -rf docs/**/* || exit 0
rm -rf docs/* || exit 0

# create the sphinx documents
# create the documents using JSDoc
createDocs

# Now let's go have some fun with the cloned repo
cd docs
git config user.name "Travis CI"
git config user.email "$COMMIT_AUTHOR_EMAIL"

# If there are no changes to the compiled out (e.g. this is a README update) then just bail.
if [ -z $(git diff --exit-code > /dev/null) ]; then
echo "No changes to the documentation on this push; exiting."
exit 0
fi

# Commit the "changes", i.e. the new version.
# The delta will show diffs between new and old versions.
git add .
git commit -m "[Travis Commit] Automated Deploy to gh-pages | Caused by ${SHA}
refer auto_commit_script: https://github.com/AutolabJS/autolabcli/blob/$SOURCE_BRANCH/script/doc_auto_deploy.sh
"
" || exit 0 # fail silently if there is nothing to commit

#go to parent directory and perform SSH configuration
cd ..
Expand Down

0 comments on commit 3226191

Please sign in to comment.