Skip to content

Refactor (#173)

Refactor (#173) #59

Workflow file for this run

on:
push:
branches:
- main
name: pkgdown
jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3'
- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.7.3'
- name: Install GDAL
run: |
# install spatial dependencies
rm '/usr/local/bin/gfortran'
brew install pkg-config gdal proj geos harfbuzz fribidi
export LDFLAGS="-L/usr/local/opt/libpq/lib"
export CPPFLAGS="-I/usr/local/opt/libpq/include"
- name: Install renv
shell: Rscript {0}
run: |
install.packages("renv")
- uses: actions/cache@v2
with:
path: ~/Library/Application Support/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore packages
shell: Rscript {0}
run: |
renv::restore()
- name: Install package
run: R CMD INSTALL .
- name: Deploy package
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'