I am using github actions to deploy a package down site to gh-pages. The virtual machine is a mac. I am using the standard github action found at https://github.com/r-lib/actions/blob/master/.github/workflows/pkgdown.yaml
The action fails due to an error installing the sf package. It has something to do with gdal config not being found.

The same error arises when installing from source sf_0.9-7.tar.gz
You may want to read the README of this repo, and the GH action files it uses. sf needs a couple of external libraries installed first.
Which platform? I'm also seeing an sf GA failure, for spdep on MacOS, because:
There are binary versions available but the source versions are later:
binary source needs_compilation
sf 0.9-6 0.9-7 TRUE
rgdal 1.5-18 1.5-19 TRUE
Perhaps binary should always be chosen?
Can the block starting at https://github.com/r-spatial/spdep/blob/e2fe13bbe78cb79b48731b443a04ba0984fe67b6/.github/workflows/check-standard.yaml#L67 condition on platform to use type="binary" avoiding failing attempts to install from source when CRAN binaries lag source releases? The link to the chunk in @andybeet 's issue is https://github.com/r-lib/actions/blob/7216d30a5426859594de6d571f6a3cd065f6d840/.github/workflows/pkgdown.yaml#L35. I've tried to edit my yaml file, but am in doubt.
My current edit of the yaml file succeeds in choosing the sf binary.
The new blocks, replacing in @andybeet 's case:
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
shell: Rscript {0}
would be by analogy:
- name: Install source dependencies
if: runner.os == 'Linux'
run: |
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Install binary dependencies
if: runner.os != 'Linux'
run: |
remotes::install_deps(dependencies = TRUE, type="binary")
shell: Rscript {0}
- name: Install pkgdown
run: |
install.packages("pkgdown", type = "binary")
shell: Rscript {0}
Thanks both. In the end i implemented @rsbivands fix to install all deps from binary. Worked a like a charm.
Most helpful comment
My current edit of the yaml file succeeds in choosing the sf binary.
The new blocks, replacing in @andybeet 's case:
would be by analogy: