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:
|
Locations:
|
||||||
|
|
||||||
- Ubuntu: `~/.local/share/renv`
|
- Ubuntu: `~/.cache/R/renv`
|
||||||
- macOS: `~/Library/Application Support/renv`
|
- macOS: `~/Library/Caches/org.R-project.R/R/renv`
|
||||||
- Windows: `%LOCALAPPDATA%/renv`
|
- Windows: `%LOCALAPPDATA%/R/cache/R/renv`
|
||||||
|
|
||||||
### Simple example
|
### Simple example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.local/share/renv
|
path: ~/.cache/R/renv
|
||||||
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
|
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-renv-
|
${{ 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
|
### 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
|
- uses: actions/cache@v2
|
||||||
if: startsWith(runner.os, 'Linux')
|
if: startsWith(runner.os, 'Linux')
|
||||||
with:
|
with:
|
||||||
path: ~/.local/share/renv
|
path: ~/.cache/R/renv
|
||||||
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
|
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-renv-
|
${{ runner.os }}-renv-
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue