Skip to content

Commit

Permalink
use setup renv action
Browse files Browse the repository at this point in the history
  • Loading branch information
drmowinckels committed Jul 14, 2023
1 parent 6adf6e9 commit cf3e72c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/build_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ concurrency:

jobs:
build:
env:
RENV_PATHS_ROOT: ~/.local/share/renv
name: Build and publish preview through Netlify
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -107,19 +105,8 @@ jobs:
with:
r-version: '4.2.0'

- name: Cache packages
uses: actions/cache@v1
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
- name: Setup Renv
uses: r-lib/actions/setup-renv@v2

- name: Populate untranslated pages
run: Rscript scripts/missing_translations.R
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build_site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
build:
name: Build and publish production
runs-on: ubuntu-22.04
env:
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/check-jsons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
name: Check modified jsons
runs-on: macOS-latest
env:
RENV_PROFILE: "json"
RENV_PATHS_ROOT: ~/.local/share/renv
RENV_PROFILE: json
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -27,19 +26,8 @@ jobs:
with:
r-version: '4.2.0'

- name: Cache packages
uses: actions/cache@v1
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
- name: Setup Renv
uses: r-lib/actions/setup-renv@v2

- name: Validate jsons
run: Rscript scripts/validate_jsons.R

0 comments on commit cf3e72c

Please sign in to comment.