-
Notifications
You must be signed in to change notification settings - Fork 481
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
Don't deploy documentation on cron jobs #917
Conversation
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.
There is some logic that skips deployment when nothing has changed, but I have noticed there are always some small changes anyway. For example 68fe03b was built for the same Documenter commit as the previous one. This PR seem OK to me. Would be good to document all of the criteria in the manual, but does not need to be in this PR.
LGTM, makes sense to have this. Would you mind adding a note about this to the CHANGELOG under a Ideally, we would have the output be more deterministic. I think the sorting of methods / docstrings is a bit stochastic sometimes? |
Thanks! |
Hi, could you please point me to the right approach on how to deploy docs from Travis? Since v0.22.x it looks like the "cron" on master branch for deployment is no longer a viable way to do it: ┌ Info: Deployment criteria:
│ - ✔ ENV["TRAVIS_REPO_SLUG"]="JuliaRobotics/Caesar.jl" occurs in repo="github.com/JuliaRobotics/Caesar.jl.git"
│ - ✔ ENV["TRAVIS_PULL_REQUEST"]="false" is "false"
│ - ✔ ENV["TRAVIS_TAG"]="" is (i) empty or (ii) a valid VersionNumber
│ - ✔ ENV["TRAVIS_BRANCH"]="master" matches devbranch="master" (if tag is empty)
│ - ✔ ENV["DOCUMENTER_KEY"] exists
│ - ✘ ENV["TRAVIS_EVENT_TYPE"]="cron" is not "cron"
└ Deploying: ✘
The command "julia --project=docs/ docs/make.jl" exited with 0. I have looked at Reference: Thanks in advance! |
I took a look at your Travis log and it's really confusing.. It looks like your jobs are erroneously being marked as cron (i.e. a Travis bug). Maybe send their support an email to inquire. |
Unless you indeed have some weird cron setup that runs only once on PR merge. Do you have any Travis settings tweaked from the defaults? |
Thanks for taking a look.
The log is standard Travis
FYI, I am not running tests on master commit, and maybe that is why? My thinking a while back was test on PR and weekly "cron" builds only, thereby reducing Travis load.
I don't think so. "Build pushed branches" is turned OFF. "Build pushed pull requests" is ON. |
Will quickly try with "Build pushed branches" ON. |
Yep, the deployment is meant to happen on "push to |
In general, you should definitely be building on pushes to master (here is some justification)). If you want to keep your existing CI setup, you can also manually set the environment variable Edit: It would probably be better to instead update get(ENV, "TRAVIS_EVENT_TYPE", "") == "cron" && delete!(ENV, "TRAVIS_EVENT_TYPE") |
That was it, thanks! ┌ Info: Deployment criteria:
│ - ✔ ENV["TRAVIS_REPO_SLUG"]="JuliaRobotics/Caesar.jl" occurs in repo="github.com/JuliaRobotics/Caesar.jl.git"
│ - ✔ ENV["TRAVIS_PULL_REQUEST"]="false" is "false"
│ - ✔ ENV["TRAVIS_TAG"]="" is (i) empty or (ii) a valid VersionNumber
│ - ✔ ENV["TRAVIS_BRANCH"]="master" matches devbranch="master" (if tag is empty)
│ - ✔ ENV["DOCUMENTER_KEY"] exists
│ - ✔ ENV["TRAVIS_EVENT_TYPE"]="push" is not "cron"
└ Deploying: ✔
Initialized empty Git repository in /tmp/tmp50WrnT/.git/
... Think I initially went down the wrong path due to │ - ✘ ENV["TRAVIS_EVENT_TYPE"]="cron" is not "cron" rather than something like Thanks again for the help! |
I can definitely see how the notation might be confusing. I wonder if changing the order would be clearer:
|
In my case, I don't think swapping the order would have worked for me. I started searching for issues and hadn't found one yet -- hope this thread helps in the future. I looked at the code a little and didn't want to add too many if statements for just that one line. That would change the behavior for different cases of "is not cron" in different cases. I think this issue discussion should be enough. If this happens again and more people comment for "cron is not cron" to be little clearer, then perhaps worth it... |
It's not really useful to deploy the same commit repeatedly.
Docs on the env variable can be found here (
TRAVIS_EVENT_TYPE
).