-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add GitHub action to automatically render skeleton.Rmd when pull requests are made #133
Conversation
Add docx output to github
remove automatic runs when push to feature development branch
I'm conflicted about this approach. On the one hand, it's super handy to have the PDF render on PR. On the other hand, like you say, git/GitHub aren't designed to track PDF/DOCX files and it will bloat the repo with each successive render that's committed. There also isn't the ability to diff PDF files in a useful way to see what exactly has changed, besides just doing a visual check. I'd probably advocate the approach of just having the PR author and/or reviewer build the PDF on their own machine from the PR branch, but it might also be possible to set up this GitHub Action to render the PDF to somewhere on the cloud for viewing, without actually committing it into the repo. Something like this? https://sha.ws/posts/automatic-upload-to-google-cloud-storage-with-github-actions/ |
All good points, Dave, and some of the same concerns I had. I just learned that you can save "artifacts" from GitHub actions and I think this may be the best solution: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts I'm going to mark this PR as draft and try that approach instead. |
Oh, very cool! That approach sounds like it could be the best of both worlds. |
Okay, I successfully switched to the "artifacts" approach. You can now see the rendered pdf and docx by viewing the details of the render-skeleton-rmd GitHub action, for example the latest run is here: https://github.com/FredHutch/VISCtemplates/actions/runs/8179544879#artifacts Clicking on the artifact name will download a zip file with both pdf and docx, which can easily be viewed and reviewed. No files are committed to the repo, though, so there won't be any bloating. |
Note that this is still only rendering the visc_empty skeleton.Rmd, as there are additional complexities with rendering the visc_report skeleton.Rmd (but I can work on that too if people feel it is important - the challenge is that additional child Rmds are assumed to be in particular locations, such as background.Rmd, so a little more setup is required). |
This is so cool |
Thanks for reviewing and giving feedback, @slager ! |
I thought it would be really helpful to have the report skeletons automatically render to pdf and docx when pull requests are made, so that PR issuers and reviewers can easily see the impact of template changes (and the current status of how reports look using the template skeleton).
This is a draft pull request - I would love to get feedback on, for example: