-
Notifications
You must be signed in to change notification settings - Fork 10
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 deployment of documentation on github pages to CI #189
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.
awesome, thanks for implementing this!
it's hard for me to evaluate, can I somehow check the github pages generated by this? is the doc deployed every time travis runs? how does this work? does every new PR update the docs? is that what we want? sorry, i am not familiar with this infrastructure
Yes, I was wondering, too, how we can actually check this PR, I honestly don't know. In general, the deploy phase is skipped for PR builds, i.e., this will only be executed once a PR is merged into master and master is rebuilt in Travis. That means, only then the documentation is rebuild and deployed to github pages. I think, this is what we want, right? Regarding versioned documentation, i.e., having a documentation for release version alongside with the latest documentation: I am not sure how to do that at the moment. Will have to investigate, but I am pretty sure it is possible. |
yes, that sounds like what we want! 👌 can you somehow force deploy for this specific PR or do we need to work on master? 😬
this would indeed be great! and if we have to trigger it manually once per release, that would also be fine. |
I don't think it's possible to trigger the deploy manually here, because PR builds just skip this phase altogether and there seems to be no option to circumvent this. (See here for documentation about deploy phases: https://docs.travis-ci.com/user/deployment#pull-requests ) The CI here also doesn't run, I am not sure what the reason for this is. I hesitate to just merge the PR like this, basically untested, but I don't know any other way. This seems a bit absurd. |
Maybe we can merge this first to a different branch (e.g. |
I found a different way to test this:
However, one problem remains: Currently, the deplog phase is run for each of the 4 jobs, which is a) unnecessary because we only need to run it once and b) fails for the job that does not install the doc requirements. |
Update: I think I figured out a way to achieve everything, but now the deploy phase is skipped for all jobs, even for the one that should execute it (py=3.8, DEP=[all]). I don't understand why and have created a thread in the Travis CI community forum to ask for help: https://travis-ci.community/t/conditional-deploy-in-build-matrix-does-not-work/9362?u=mschmidt87 |
ef306df
to
d9243e9
Compare
Update: I received a reply and could solve the issue (some simple syntax error). For evidence that the pipeline is working, see the build job on this feature branch here: https://travis-ci.org/github/Happy-Algorithms-League/hal-cgp/builds/709031726 |
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.
two small suggestions, otherwise great!
d9243e9
to
dad64d7
Compare
dad64d7
to
bd4fd8d
Compare
bd4fd8d
to
4db00df
Compare
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.
looks great! 👍 and merging
This fixes #184 .
First we build the documentation in one of the jobs (I simplified the command here) and place a
.nojekyll
file in the html folder (which tells github pages that we're not using jekyll as a static site builder).In addition, the PR adds a deploy stage to travis CI, which will push the contents of
doc/_build/html
.I followed the steps in this tutorial: https://medium.com/@FelipeFaria/sphinx-travis-ci-github-pages-full-integration-for-auto-docs-publishing-91ce93179e17
Update:
I also added a bit of simplification to the travis file:
[dev]
requirements in the last job so that we can skip the manual install ofblack
,mypy
, andflake8
.I also added references to the documentation to the README.