-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.72 KB
/
site.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Workflow derived from https://github.com/prncevince/r-actions/
name: rmd-site
on:
push:
branches: [main]
paths-ignore: ['**.md']
pull_request:
branches: [main]
paths-ignore: ['**.md']
workflow_dispatch:
jobs:
rmd-site:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
r: ['release']
r-repo: ['https://packagemanager.rstudio.com/all/__linux__/focal/latest']
# Only runs PR jobs concurrently & uses same group as other ghpages jobs
# PR jobs run in their own branch & do not deploy anything - so we assume they can run concurrently
concurrency:
group: ghpages-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_CONFIG_REPOS_OVERRIDE: ${{ matrix.r-repo }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- name: Install system dependencies on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libgdal-dev libproj-dev libgeos-dev libudunits2-dev netcdf-bin libglpk-dev libxml2-dev libgmp3-dev pngquant
- uses: prncevince/r-actions/setup-renv@v1.4.0
with:
type: 'restore'
- uses: prncevince/r-actions/setup-knitr-cache@v1.4.0
with:
cache: 'spatial-mlr3_cache'
- name: Setup & Build Site
run: make
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages
folder: docs
target-folder: .