-
-
Notifications
You must be signed in to change notification settings - Fork 735
Add automated docs in Travis CI #801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automated docs in Travis CI #801
Conversation
Updates gradle to create docs directory on Travis deployment. Use Travis pages provider to upload the docs directory
Stays consistent with existing format for JS and iOS docs
Codecov Report
@@ Coverage Diff @@
## master #801 +/- ##
=========================================
Coverage 53.35% 53.35%
Complexity 1749 1749
=========================================
Files 132 132
Lines 10268 10268
Branches 1426 1426
=========================================
Hits 5478 5478
Misses 4337 4337
Partials 453 453 Continue to review full report at Codecov.
|
Nice, this looks good. |
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard | ||
local_dir: docs/ | ||
on: | ||
all_branches: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't we want to only do this on the master branch, @addisonElliott ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent an hour or two thinking the same thing. I used the same code that @flovilmart used when he added automated docs for JS and iOS.
See here:
- https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/master/.travis.yml#L38
- https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/master/.travis.yml#L38
all_branches excludes PRs. It took me awhile to find documentation saying that.
My guess is the thought process is that the only new branches on Parse-SDK-Android will be the master branch commit or new tags. Thus, the latest documentation will be pushed whenever a new commit to master is made or a new release is made.
Let’s see how it goes |
Thanks @addisonElliott! |
Updates gradle to create a docs/api directory on Travis deployment. Additionally, clean up Travis CI to have two stages, test and release. This stays consistent with JS and iOS branches that received an update already.
Use Travis pages provider to upload the docs directory.
Note: In Parse-SDK-JS and Parse-SDK-iOS, the publish docs scripts clone the Git repository before placing changes and uploading again. I'm not sure there is not any point to it. The pages provider does a force-push that does not store incremental changes for the docs.
Also, there is a new feature
keep-history
that will keep the previous history if incremental docs are desired. If desired, let me know and I will add it.More info can be found here and here
This code was tested on fork where I setup Travis CI. Docs can be seen here and build can be seen here