Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-update pkgdown build and website deployment #335

Open
edwardsmarc opened this issue Jul 20, 2023 · 5 comments
Open

Auto-update pkgdown build and website deployment #335

edwardsmarc opened this issue Jul 20, 2023 · 5 comments
Assignees

Comments

@edwardsmarc
Copy link
Contributor

Configuring a github action to build the pkgdown website and deploy from a dedicated gh-pages branch when the code is updated.

This involves the calling the following from the RStudio project:

use_github_pages()
use_github_action("pkgdown")

Detailed here: https://usethis.r-lib.org/reference/use_pkgdown.html

  • We don't call use_pkgdown_github_pages() because we're already using pkgdown so the call to use_pkgdown() is not needed.
@edwardsmarc edwardsmarc self-assigned this Jul 20, 2023
@edwardsmarc
Copy link
Contributor Author

Had to update rlang to 1.1.0 and usethis to 2.2.2 to get this to work.

@edwardsmarc
Copy link
Contributor Author

Getting an error in the github pkgdown Action.

image

rcbc package install fails while the Action is loading package dependencies for the pkgdown build.

I'm wondering if I need to install cbc on the runner, similar to what the Ubuntu test Action does:

- name: Install system dependencies
        run: |
          sudo apt-get -y install libcurl4-openssl-dev coinor-libsymphony-dev coinor-libcbc-dev coinor-libclp-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev libharfbuzz-dev libfribidi-dev

@edwardsmarc
Copy link
Contributor Author

That seemed to work.

Next error is Error: 'build_site_github_pages' is not an exported object from 'namespace:pkgdown'

This is because our renv.lock uses an older version of pkgdown. I tried updating pkgdown in the renv.lock but that triggered about 20 other dependency updates which led to build_site() failing locally for reasons I couldn't decipher.

I'll now try just installing the newest pkgdown in the github runner to get access to the function without having to edit the wtw package environment.

@edwardsmarc
Copy link
Contributor Author

Error now when trying to install the new pkgdown after a successful renv::restore.

Error: Error: GitHub record for package 'downlit' has no recorded 'RemoteSha' / 'RemoteRef'

Possibly a pkgdown dependency issue. This might only be solved by updating packages in renv.lock.

edwardsmarc added a commit that referenced this issue Jul 21, 2023
Removed the github Actions pkgdown workflow from this PR. #335 needs more work because the Action was failing when getting the env set up. Likely we need to update pkgdown in the renv.lock along with a bunch of other dependencies.

This PR updates the website with some acknowledgements and fixes the broken DESCRIPTION file where only one maintainer role can be allocated to authors.

I also testing updating igraph and rlang to match my local env, but that was causing the Ubuntu check to fail so I've dropped those and will test all the required package updates on a separate branch.
@edwardsmarc
Copy link
Contributor Author

Putting this on hold until we develop a systematic way to periodically update the renv package environment as discussed in #303.

I expect this issue will resolve itself once we have the current version of pkgdown as a dependency in wheretowork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant