R CMD check on github actions failing suddenly with missing renv ${VERSION}

Sure, but you still need the first line of the .Rprofile file, renv and/or r-lib/actions/setup-renv need that. Look at the builds and the commits here:

So if you still want to include your local setup in .Rprofile, make sure that only the first line runs on GitHub Actions. E.g. put the rest into

if (Sys.getenv("CI") != "true") {
  ...
}

(See Variables - GitHub Docs)

Can you tell me where the docs suggest that? It is probably a mistake. Thanks.