Invalid "use pkgdown::clean_site()" advice
When docs/ is not empty and not created by pkgdown, an error message will be returned:
https://github.com/r-lib/pkgdown/blob/c7c4865d9ebd492010c99db13a3e377cd1d9ed34/R/clean.R#L30-L41
But when running pkgdown::clean_site(), the same message is returned because clean_site() itself calls check_dest_is_pkgdown():
https://github.com/r-lib/pkgdown/blob/c7c4865d9ebd492010c99db13a3e377cd1d9ed34/R/clean.R#L19-L21
I can create a reprex package for this issue if helpful.
Hmmm, I think it's the advice that's wrong here — clean_site() is specifically for cleaning up sites (as the name suggests 😄) not deleting directories that aren't sites.
@Bisaloo what advice do you think pkgdown should provide in this case?
Actually, in testing this, the advice is to "make sure it contains no important information and use pkgdown::clean_site() to
delete its contents." So this would imply that clean_site() should delete anything in the directory, regardless of whether it was built by pkgdown or not.
We could just add clean_site(force = TRUE) to skip the check that the directory was built by pkgdown.