altair icon indicating copy to clipboard operation
altair copied to clipboard

Consider using diff tool for rendered doc pages in CI

Open joelostblom opened this issue 1 year ago • 6 comments

What is your suggestion?

One of my colleagues built a tool that diffs HTML pages in a way that makes it easier to detect changes to the rendered page https://github.com/trevorcampbell/website_diff. Could be a useful tool to add to our CI for doc-related changes.

Have you considered any alternative solutions?

No response

joelostblom avatar Jun 12 '24 08:06 joelostblom

Let me know if you folks end up trying it. @briank-git and I would of course be happy to make fixes/improvements to get it working for you if needed.

trevorcampbell avatar Aug 13 '24 18:08 trevorcampbell

Thanks @trevorcampbell and @briank-git! Did you end up making a github actions template somewhere that we could use as a starting point?

joelostblom avatar Aug 13 '24 22:08 joelostblom

Ah, right -- that's not done yet but it was on my to-do list at some point. Thanks for the reminder :-) I'll do that in the next few weeks and post here again.

trevorcampbell avatar Aug 15 '24 09:08 trevorcampbell

Example added here:

https://github.com/trevorcampbell/website_diff/blob/main/.github/workflow-templates/example_workflow.yml

Actual live running example can be found in the deploy_pr_preview.yml in https://github.com/UBC-DSCI/introduction-to-datascience-python/tree/main/.github/workflows .

Example PR with the workflow run on it here: https://github.com/UBC-DSCI/introduction-to-datascience-python/pull/350

Resulting diff site here: https://python.datasciencebook.ca/diff350/index.html

You can see that the diff picks up some unintended changes in the build (that weren't indicated by the source diff).

trevorcampbell avatar Aug 18 '24 23:08 trevorcampbell

Super, thank you @trevorcampbell ! I will look into this over the coming weeks and try to add it.

joelostblom avatar Aug 21 '24 13:08 joelostblom

Awesome :-) I'm going to merge that PR in the examples above, so FYI the links to the example PR + diff won't work any more. But the template action will still be in the website_diff repo for you to follow.

trevorcampbell avatar Aug 21 '24 14:08 trevorcampbell