-
Notifications
You must be signed in to change notification settings - Fork 0
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
Workflow to build and deploy docs #52
Conversation
@jwallwork23 I think I got this very close to working! But the error now is Edit: I think you just need to choose "GitHub Action" in the pulldown menu under "Source" and then it will automatically recognise this workflow. |
188fbff
to
f623f23
Compare
Okay I changed it to go from this branch temporarily. |
Great, thanks! This seemed to work (e.g. https://mesh-adaptation.github.io/mesh-adaptation-docs/demos/ping_pong.py.html has no pictures so I guess that's from this build). Let me now run all demos and see if it works. And yeah, I temporarily have
but will change the if statement to be main branch before this gets merged, so the website gets deployed only if called from the main branch. |
This looks good now: https://mesh-adaptation.github.io/mesh-adaptation-docs/. TODO before merging:
|
Just to repeat what I said in the meeting: https://mesh-adaptation.github.io/ is the old website (with UM2N) and https://mesh-adaptation.github.io/mesh-adaptation-docs/ is the new one deployed by this workflow (without UM2N) |
Congrats @ddundo I've promoted you to "Owner" of the mesh-adaptation org. I trust you to make setting changes without my oversight :) Would it be possible to progress this PR before setting up the UM2N Docker build or is that a necessary step? |
That's exciting! Thanks :) but please demote me after this is merged - I trust myself less than you might trust me :)
The way it's currently set up, we'd need to import |
Renamed to |
4015784
to
fb0b6ca
Compare
@jwallwork23 this is ready for review now when you have time :) The CI will trigger every time, run the demos and build docs. So we can check that the docs build properly every time (and it also gives a link to download the html build locally). But it won't deploy it to https://mesh-adaptation.github.io/docs/ unless the Ci was triggered on the main branch (i.e., when merged or when triggered mannually). Edit: actually I now modified it so that it triggers only when something in |
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.
Great! Thanks again for setting this up. I have a few questions.
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/**' | ||
- '.github/workflows/build_docs.yml' | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
- '.github/workflows/build_docs.yml' | ||
workflow_dispatch: |
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.
Is there a way we could trigger the workflow when there's a push to the main
branch of one of Animate/Goalie/Movement/UM2N?
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 think this would require calling this workflow from Animate/Goalie/Movement/UM2N, similarly to how we have the "reusable" test workflow here in docs
that is called by them. I think this can become a pain to maintain (e.g. how now you had to open 4 separate PRs to fix the docs
renaming) so I think it's easier to just trigger this workflow manually when we want to update? Since it's just a press of a button :)
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.
Although... now that I think about it. Maybe it would be useful to have an option to call it from branches other than main
, so that we can easily check in PRs that the formatting etc. in docs looks good before merging them.
But I guess this would then be a smaller workflow that would only run the demos from that particular repo and not from all 4. What do you think?
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 think this would require calling this workflow from Animate/Goalie/Movement/UM2N, similarly to how we have the "reusable" test workflow here in
docs
that is called by them. I think this can become a pain to maintain (e.g. how now you had to open 4 separate PRs to fix thedocs
renaming) so I think it's easier to just trigger this workflow manually when we want to update? Since it's just a press of a button :)
I get that, although in general it's nice if we don't have to remember to do things.
Although... now that I think about it. Maybe it would be useful to have an option to call it from branches other than
main
, so that we can easily check in PRs that the formatting etc. in docs looks good before merging them.But I guess this would then be a smaller workflow that would only run the demos from that particular repo and not from all 4. What do you think?
It would be really nice if each repo had a build_docs
job that could be triggered to build its part of the docs, but I think it's beyond the scope of this PR. It'd be better to just get this merged first. My original question was just in case you were aware of an easy way to set it up.
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 get that, although in general it's nice if we don't have to remember to do things.
Sadly I couldn't find a way for the docs
repo to "listen" for changes in other repos. But we could set up a workflow with a schedule
trigger that would check, let's say, every 12 hours if there have been changes in these repos. And if so, then the docs could be rebuilt?
It would be really nice if each repo had a
build_docs
job that could be triggered to build its part of the docs, but I think it's beyond the scope of this PR. It'd be better to just get this merged first. My original question was just in case you were aware of an easy way to set it up.
Agreed :) I opened #78
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.
Sadly I couldn't find a way for the
docs
repo to "listen" for changes in other repos. But we could set up a workflow with aschedule
trigger that would check, let's say, every 12 hours if there have been changes in these repos. And if so, then the docs could be rebuilt?
Yeah that could work. A nightly check would probably be sufficient.
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.
Sounds good. Opened #79
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.
Great stuff, thanks again @ddundo!
Closes #4.