altair
altair copied to clipboard
Consider using diff tool for rendered doc pages in CI
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
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.
Thanks @trevorcampbell and @briank-git! Did you end up making a github actions template somewhere that we could use as a starting point?
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.
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).
Super, thank you @trevorcampbell ! I will look into this over the coming weeks and try to add it.
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.