Skip to content

CircleCI setup for PR documentation previews #104

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

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

melissawm
Copy link
Member

Description

Initial CircleCI set up to allow for PR documentation previews.

Type of change

  • Fixes or improves existing content
  • Adds new content page(s)
  • Fixes or improves workflow, documentation build or deployment

References

Addresses #98

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have added alt text to new images included in this PR

@melissawm melissawm force-pushed the circleci-project-setup branch from 3f61361 to ac0949e Compare February 10, 2023 17:51
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 10, 2023
@melissawm melissawm force-pushed the circleci-project-setup branch from ac0949e to 47a9cbe Compare February 10, 2023 18:02
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Feb 10, 2023
@psobolewskiPhD
Copy link
Member

OMG so excited for this! Let me know if I can help with anything!!
❤️

@github-actions github-actions bot added the task label Feb 10, 2023
@melissawm melissawm force-pushed the circleci-project-setup branch 2 times, most recently from 8cb8f3f to 1247be7 Compare February 10, 2023 19:37
@melissawm melissawm force-pushed the circleci-project-setup branch from b11db80 to 226dbf6 Compare February 10, 2023 20:37
@melissawm
Copy link
Member Author

Ok! I got the first part - CircleCI is set up and you can get a status update with the link to the artifact!!! 🎉

Please check it out here: melissawm#3

Note that this doesn't work on this PR, as the setup only works if the CircleCI job is already committed to the main branch. I did that to my own fork, so you can navigate to the PR above and click on the Details of the "Check the rendered docs here" check:

Screenshot_20230210_175119

This is a proof of concept, and there are no hard feelings if this doesn't get merged in the end 😄 I personally like this, but it needs a little more work because we would need to rewrite/replace the deploy_docs action here. Now that the basic details are set up I don't think it would be too difficult.

Last note is that this requires a github token with access to the repo, which I've done on my fork.

@psobolewskiPhD
Copy link
Member

Outstanding! I love the small Melissa icon (docs 👸) and the clear instructions on the action to click!
❤️

@jni
Copy link
Member

jni commented Feb 11, 2023

it needs a little more work because we would need to rewrite/replace the deploy_docs action here.

Why? Is it just to not have to maintain lots of different CI jobs? If so I reckon just leave it, we can cross that bridge later.

This is a proof of concept, and there are no hard feelings if this doesn't get merged in the end

Erm I wanna merge the thing! 😂

@melissawm
Copy link
Member Author

melissawm commented Feb 11, 2023

Lol that is good with me - yeah I was just thinking we could have shorter CI and less use if resources but we can definitely do that later. Let me remove from draft then 😁

@melissawm melissawm marked this pull request as ready for review February 11, 2023 11:35
permissions:
statuses: write
name: Run CircleCI artifacts redirector
# if: github.repository == 'napari/docs'
Copy link
Member

@psobolewskiPhD psobolewskiPhD Feb 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line be changed to be un-commented before merging? Based on the line at the top of the file to enable this workflow on a fork comment out:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - so if this is commented the action also runs on forks (the case now that I'm running this on my fork). We should probably remove this before merging. If you folks are ready for that (i.e. no other reviews are necessary) I can do that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, the code seems correct and it works on your fork...
This doesn't directly affect the website or any end users, so I'd be game to merge sooner rather than later and then if need be tweak something? Dunno if that makes sense in the grand scheme of things—will defer to others with more experience, like you and @jni

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? By default, a contributor will not have circleCI configured, so the workflow will not be triggered. But could a contributor allow testing without creating PR? I would rather see a limited list of branches.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, am I missing something?
I understood this action would still run on PRs in this repo, and make a clickable link like the numpy PRs...
See #98 (comment)
The contributor shouldn't need to do anything on their fork I don't think once this is in main anyways.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes people work on their Fort until get a satisfying solution to not depend on the test queue of the napari organization.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, fair enough. But I think docs contributors may be less savvy and more like end-users, rather than developers, so this PR is a nice quality of life improvement where they can see the rendered docs online.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is my understanding this will only run in their forks if they do sign up with CircleCI - otherwise they won't have the appropriate credentials.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an opinion here. It's easy enough for a contributor to edit that line... Is this ready other than this discussion?

@Czaki
Copy link
Contributor

Czaki commented Feb 15, 2023

I will merge this as it is to enable it in the repository and observe it in the wild.

@Czaki Czaki merged commit e2103a3 into napari:main Feb 15, 2023
@melissawm melissawm deleted the circleci-project-setup branch April 12, 2023 20:53
@psobolewskiPhD psobolewskiPhD added this to the 0.5.0 milestone Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants