Skip to content

leaflet() workaround for sf proj.db Error with mapView() #9

leaflet() workaround for sf proj.db Error with mapView()

leaflet() workaround for sf proj.db Error with mapView() #9

Workflow file for this run

on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: macOS-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true # for pdf
# From https://github.com/rspatial/terra/blob/master/.github/workflows/pkgdown.yml
# - name: Install spatial dependencies
# run: brew install gdal proj
# https://github.com/r-spatial/sf/blob/2867dd290a3692cd9f041a7b9297149ea6cffe87/README.md#macos
# - name: Install spatial dependencies
# run: brew install pkg-config gdal
# remotes::install_github("r-spatial/sf", configure.args = "--with-proj-lib=$(brew --prefix)/lib/")
# PKG_CONFIG
# options(configure.args = list(
# sf = " \
# --with-gdal-lib=/opt/homebrew/opt/gdal/lib/ \
# --with-sqlite3-lib=/opt/homebrew/opt/sqlite/lib/ \
# --with-gdal-config=/opt/homebrew/bin/gdal-config \
# --with-proj-share=/opt/homebrew/opt/proj/share/ \
# --with-proj-lib=/opt/homebrew/opt/proj/lib \
# --with-proj-include=/opt/homebrew/opt/proj/include/ \
# --with-geos-config=/opt/homebrew/opt/geos/bin/geos-config \
# --pkg-config=/opt/homebrew/bin/pkg-config"))
# renv::install("r-spatial/sf")
renv::install("[email protected]")

Check failure on line 46 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 46
Sys.setenv("PROJ_LIB"="")
install.packages("sf", type = "source")
install.packages("sf", type = "source", configure.args =
'--with-gdal-lib=/opt/homebrew/opt/gdal/lib/
--with-sqlite3-lib=/opt/homebrew/opt/sqlite/lib/
--with-gdal-config=/opt/homebrew/bin/gdal-config
--with-proj-share=/opt/homebrew/opt/proj/share/
--with-proj-lib=/opt/homebrew/opt/proj/lib
--with-proj-include=/opt/homebrew/opt/proj/include/
--with-geos-config=/opt/homebrew/opt/geos/bin/geos-config')
install.packages("sf", type = "source", configure.args="--with-proj-lib=/opt/homebrew/lib/")
# install.packages("sf", type = "source", configure.args =
'
--with-gdal-lib=/opt/homebrew/opt/gdal/lib/
--with-sqlite3-lib=/opt/homebrew/opt/sqlite/lib/
--with-gdal-config=/opt/homebrew/bin/gdal-config
--with-proj-share=/opt/homebrew/opt/proj/share/
--with-proj-lib=/opt/homebrew/opt/proj/lib
--with-proj-include=/opt/homebrew/opt/proj/include/
--with-geos-config=/opt/homebrew/opt/geos/bin/geos-config')
#
# From https://github.com/actions/setup-python
# - name: Setup Python
# uses: actions/setup-python@v3
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.2'
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}