Skip to content

Add GH action for commenting with link to docs preview #227

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

Closed
wants to merge 1 commit into from

Conversation

theogf
Copy link
Member

@theogf theogf commented Jan 12, 2021

I thought it would be practical to automatically get a comment with a link to the preview of the docs.

@github-actions
Copy link
Contributor

Once the build has completed, you can preview your PR at this URL: https://juliagaussianprocesses.github.io/KernelFunctions.jl/previews/PR227/

@willtebbutt
Copy link
Member

Oooo I like this. In some ways it's a little redundant since, as @devmotion pointed out, you can just click on the Details of documenter/deploy, but for people who don't know about that it's way more explicit, and I don't think that you really lose anything.

@devmotion
Copy link
Member

If we want to have a more prominent comment (I am not sure about this since the preview is already quite accessible) I think it would make more sense to add a final step to the documentation action. It seems a bit weird to just post a comment with the link, even it the build fails and the link is broken.

@theogf
Copy link
Member Author

theogf commented Jan 12, 2021

you can just click on the Details of documenter/deploy, but for people who don't know about that it's way more explicit, and I don't think that you really lose anything.

That's what I did for #225, but then I realised it's also pretty bothersome to go through all those clicks 😅
EDIT : Ah no I misunderstood the point, I actually went to the documentation build and found the link in there. It's true that you get to the docs in one click

@devmotion That's a good point. It's just going to be a bit more tricky:
The comment should only appear once, so we need to check when the docs build has succeeded for the first time. I have no idea how to verify this...

@devmotion
Copy link
Member

@devmotion That's a good point. It's just going to be a bit more tricky:
The comment should only appear once, so we need to check when the docs build has succeeded for the first time. I have no idea how to verify this...

I imagined that there would a comment such as "Preview of documentation deployed: https://...." if it succeeds and "Preview of documentation could not be deployed" in the other case. One would have to rerun the action every time the documentation is built since otherwise you might check an outdated and incorrect preview.

@willtebbutt
Copy link
Member

Alternatively, we could just always post a comment saying "click on the Details of the documentation/deploy action to see the most recent docs build" or something like that.

@devmotion
Copy link
Member

One would have to rerun the action every time the documentation is built

But since this would lead to quite many comments I have even more doubts about this action than before.

@devmotion
Copy link
Member

Alternatively, we could just always post a comment saying "click on the Details of the documentation/deploy action to see the most recent docs build" or something like that.

Hmm I'm not sure, I assumed the main intention of this PR was to reduce the number of clicks or lookups for getting to the preview build. I guess by now all contributors know how to access the preview, so I am not sure how helpful it would be to post this information in every PR 😉

@st--
Copy link
Member

st-- commented Jan 13, 2021

I guess by now all contributors know how to access the preview

I didn't before seeing this PR 😅
Though given that I know about it the documenter/deploy - Details link is sufficient.
I was just trying to see if the status notification can be changed from just "Documentation build succeeded" to "Documentation build succeeded - click on Details for preview"? 🤔 But I couldn't find what is it that adds that status.

@devmotion
Copy link
Member

@st--
Copy link
Member

st-- commented Jan 13, 2021

Yeah that doesn't look like it's particularly trivial to change. How about simply adding a "contributing.md" that explicitly points out where to find the doc preview (can then also explain running JuliaFormatter, and anything else that'd be useful to make it easier for newcomers to start contributing)? Not sure how much work that'd be to make work here but I've also seen GitHub bots that post a comment when someone new to the repo opens their first PR, in which the bot can then point to contributing.md and/or explain the doc preview link?

@theogf
Copy link
Member Author

theogf commented Jan 13, 2021

Yeah that doesn't look like it's particularly trivial to change. How about simply adding a "contributing.md" that explicitly points out where to find the doc preview (can then also explain running JuliaFormatter, and anything else that'd be useful to make it easier for newcomers to start contributing)? Not sure how much work that'd be to make work here but I've also seen GitHub bots that post a comment when someone new to the repo opens their first PR, in which the bot can then point to contributing.md and/or explain the doc preview link?

"contributing.md" sounds like a good thing! Another option would be to put some of these info in a PR template?

@st--
Copy link
Member

st-- commented Jan 13, 2021

Another option would be to put some of these info in a PR template?

Oh yeah! I had thought of that when adding the formatter to the CI.

@theogf
Copy link
Member Author

theogf commented Feb 15, 2021

Should I just close this PR then?

@theogf theogf closed this Mar 18, 2021
@theogf theogf deleted the theogf-patch-1 branch March 18, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants