-
-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (40 loc) · 1.31 KB
/
gallery-weekly.yml
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
51
on:
workflow_dispatch:
schedule:
- cron: "0 13 * * 2"
name: gallery-weekly
jobs:
gallery-weekly:
runs-on: ubuntu-latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- id: setup
uses: r-lib/actions/setup-r@v2
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
- name: Cache R packages
uses: actions/cache@v3
with:
path: ~/.cache/R/renv
key: ${{ runner.os }}-r-${{ steps.setup.outputs.installed-r-version }}-weekly-lock-${{ hashFiles('mlr-org/renv.lock') }}
restore-keys: ${{ runner.os }}-r-${{ steps.setup.outputs.installed-r-version }}-weekly-lock-
- name: Install System Dependencies
uses: mlr-org/actions/renv-system-dependencies@v1
with:
path: 'mlr-org/renv.lock'
- name: Restore renv environment
run: |
cd mlr-org
R -q -e 'options(Ncpus = 2); install.packages("renv", repos = "cloud.r-project.org"); renv::restore()'
- name: Update renv environment
run: |
cd mlr-org
R -q -e 'renv::update(prompt = FALSE)'
- name: Render gallery
run: |
cd mlr-org
quarto render gallery