IQSS / dataverse-client-r

R Client for Dataverse Repositories
https://iqss.github.io/dataverse-client-r
61 stars 25 forks source link

Ignore pkgdown docs and publish on gh-pages #88

Closed kuriwaki closed 3 years ago

kuriwaki commented 3 years ago

"docs" was put in .gitignore but it seems like it is still got tracked. (https://github.com/IQSS/dataverse-client-r/tree/929b64fbb29d92998afd6c3452a259f49404f002/docs)

@wibeasley I think this is not ideal -- Should this be undone so html stuff is not carried around, and use use_pkgdown_github_pages() so that the docs are separately loaded onto a gh-pages branch?

wibeasley commented 3 years ago

@kuriwaki, either approach is promoted, but if you have a strong preference, I switch to the one you like.

Here's the way I've followed https://pkgdown.r-lib.org/:

This generates a docs/ directory containing a website. Your README.md becomes the homepage, documentation in man/ generates a function reference, and vignettes will be rendered into articles/. Read vignette("pkgdown") for more details and to learn how to customise your site.

If you are using GitHub, the easiest way to make this your package website is to check into git, then go to settings for your repo and make sure that the GitHub pages source is set to “master branch /docs folder”. Be sure to update the URL on your github repository homepage so others can easily navigate to your new site.

wibeasley commented 3 years ago

@kuriwaki, I've deleted the docs/ directory and made the switch in the repo settings. It looks good to me now, but tell me if you something that should or shouldn't be somewhere.

If I understand correctly from one of the pages created by the usethis function, the pkgdown website will be rebuilt any time a branch called 'main' or 'master' is pushed.

https://github.com/IQSS/dataverse-client-r/tree/gh-pages

kuriwaki commented 3 years ago

Thank you @wibeasley! This looks great. I now see both the existing method and this method are ok. The new setup seemed clean to me as PRs as edits won't involve the rendered web files.