animint2 icon indicating copy to clipboard operation
animint2 copied to clipboard

Automatic Birthday Machine

Open ampurr opened this issue 1 year ago • 12 comments

ampurr avatar Oct 29 '24 04:10 ampurr

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.

ampurr avatar Oct 29 '24 04:10 ampurr

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?

tdhock avatar Oct 29 '24 13:10 tdhock

About infosec, as member of @animint/developers you 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.

ampurr avatar Oct 30 '24 03:10 ampurr

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)

tdhock avatar Sep 12 '25 15:09 tdhock

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

tdhock avatar Sep 12 '25 15:09 tdhock

using netlify would mean changing the deployment url from https://animint.github.io/animint2/ to animint2.netlify.app or similiar

tdhock avatar Sep 12 '25 15:09 tdhock

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. :>

ampurr avatar Sep 13 '25 16:09 ampurr

thanks

tdhock avatar Sep 15 '25 14:09 tdhock

@tdhock, I'm unfamiliar with the Netlify UI. Did you have to do anything with it before deploying your GitHub Action?

ampurr avatar Sep 17 '25 02:09 ampurr

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"

tdhock avatar Sep 17 '25 13:09 tdhock

Okay, understood! Thank you. Thought I needed to do something with the Netlify website. :>

ampurr avatar Sep 18 '25 17:09 ampurr

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:

ampurr avatar Sep 24 '25 03:09 ampurr