mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 16:53:57 +08:00
(R renv) Fix Renv package cache location in examples
This commit is contained in:
parent
6bbe742add
commit
36fee96435
1 changed files with 6 additions and 6 deletions
12
examples.md
12
examples.md
|
@ -454,22 +454,22 @@ For renv, the cache directory will vary by OS. Look at https://rstudio.github.io
|
|||
|
||||
Locations:
|
||||
|
||||
- Ubuntu: `~/.local/share/renv`
|
||||
- macOS: `~/Library/Application Support/renv`
|
||||
- Windows: `%LOCALAPPDATA%/renv`
|
||||
- Ubuntu: `~/.cache/R/renv`
|
||||
- macOS: `~/Library/Caches/org.R-project.R/R/renv`
|
||||
- Windows: `%LOCALAPPDATA%/R/cache/R/renv`
|
||||
|
||||
### Simple example
|
||||
|
||||
```yaml
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.local/share/renv
|
||||
path: ~/.cache/R/renv
|
||||
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-renv-
|
||||
```
|
||||
|
||||
Replace `~/.local/share/renv` with the correct `path` if not using Ubuntu.
|
||||
Replace `~/.cache/R/renv` with the correct `path` if not using Ubuntu.
|
||||
|
||||
### Multiple OS's in a workflow
|
||||
|
||||
|
@ -477,7 +477,7 @@ Replace `~/.local/share/renv` with the correct `path` if not using Ubuntu.
|
|||
- uses: actions/cache@v2
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
with:
|
||||
path: ~/.local/share/renv
|
||||
path: ~/.cache/R/renv
|
||||
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-renv-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue