Automatic Birthday Machine
When I said it'd take a hot minute, I apparently meant about an hour or so. Nice job, past me. Thank you, pkgdown and usethis developers. You're the real heroes here. :cat2:
Anyway, the website has been updated and updates itself every time something is pushed or pulled. Note to self: Update the internal website documentation.
As an aside, I think this might actually be worse for the environment than us manually re-rendering the site when needed. You win some, you lose some by contributing to climate change, I guess.
As a second more important aside, @tdhock: If you choose to merge this, you'll probably want to go to .github/workflows/pkgdown.yaml and strip branches: [main, master, automatic-birthday-machine] to branches: [master].
I know like nothing about infosec, but the fact that I could force the website to update from a branch and bypass your decision-making feels kinda concerning. Hell, I could go and write "CATS RULE, DOGS DROOL" on the website right now and it'd update without your input. But that's a separate matter.
About infosec, as member of @animint/developers you have maintain permission on this repo.
so this PR would run pkgdown to re-make doc web site during every PR?
I think it would be better to only run that on pushes to master, which I think means removing the pull_request workflow, is that right?
About infosec, as member of
@animint/developersyou have maintain permission on this repo.
Yeah, that's true. What's new is that .github/workflows/pkgdown.yaml effectively gives us write permission on the website. In practice, not a big problem. I trust that you trust the animint developers. :>
so this PR would run pkgdown to re-make doc web site during every PR?
Yup.
I think it would be better to only run that on pushes to master, which I think means removing the pull_request workflow, is that right?
I'm pretty sure, yeah.
I think this would be better to implement using netlify deploy (does not require putting generated web pages in this repo on gh-pages branch, so more efficient git repo)
also netlify can generate a preview of the new web page for each PR. here is an example netlify deploy github action for a quarto project https://github.com/animint/animint-manual-fr/blob/main/.github/workflows/build-book.yml
using netlify would mean changing the deployment url from https://animint.github.io/animint2/ to animint2.netlify.app or similiar
Hey Toby! Congrats on your new job. Yeah, I can switch us to Netlify. Give me a few days. Away from my computer right now. :>
thanks
@tdhock, I'm unfamiliar with the Netlify UI. Did you have to do anything with it before deploying your GitHub Action?
thanks for investigating! for netlify you need to define a site ID, and a token, which I just did in secrets for this repo, so you should be able to use/adapt this action code https://github.com/animint/animint-manual-fr/blob/main/.github/workflows/build-book.yml (without having to change the NETLIFY environment variables).
To get automatic comments in pull requests, please keep PAT_GITHUB_PR which is a secret that I just created with PR permissions.
you would have to change is removing the "Render book" step and replace it with pkgdown build site code.
then in the next step "netlify deploy" change path from "Chapitres/_book" to "docs" (because pkgdown saves web site to docs directory, right?) and change netlify_url from "animint-manual-fr.netlify.app" to "animint2.netlify.app"
Okay, understood! Thank you. Thought I needed to do something with the Netlify website. :>
Thank you! Sorry, been busy lately & anticipate being busy for at least this week. I think I should be able to do this in early October. :sweat_smile: