Skip to content

Commit

Permalink
use example doc
Browse files Browse the repository at this point in the history
  • Loading branch information
linogaliana committed Oct 17, 2024
1 parent afbb95d commit aac9a57
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 20 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/bookdown-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,27 @@ jobs:
- name: Configure safe repository
run: |
git config --global --add safe.directory /__w/utilitR/utilitR
- 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
- name: Set RENV_PATHS_ROOT
shell: bash
run: |
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV
- name: Install and activate renv
run: |
install.packages("renv")
renv::activate()
shell: Rscript {0}
- name: Get R and OS version
id: get-version
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
cat("##[set-output name=os-version;]", sessionInfo()$running, "\n", sep = "")
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
shell: Rscript {0}
- name: Restore Renv package cache
uses: actions/cache@v4
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('renv.lock') }}
restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-
env:
GITHUB_PAT: ${{ secrets.PAT }}
- name: Render Book
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,27 @@ jobs:
- name: Configure safe repository
run: |
git config --global --add safe.directory /__w/utilitR/utilitR
- 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
- name: Set RENV_PATHS_ROOT
shell: bash
run: |
echo "RENV_PATHS_ROOT=${{ runner.temp }}/renv" >> $GITHUB_ENV
- name: Install and activate renv
run: |
install.packages("renv")
renv::activate()
shell: Rscript {0}
- name: Get R and OS version
id: get-version
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
cat("##[set-output name=os-version;]", sessionInfo()$running, "\n", sep = "")
cat("##[set-output name=r-version;]", R.Version()$version.string, sep = "")
shell: Rscript {0}
- name: Restore Renv package cache
uses: actions/cache@v4
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ inputs.cache-version }}-${{ hashFiles('renv.lock') }}
restore-keys: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{inputs.cache-version }}-
env:
GITHUB_PAT: ${{ secrets.PAT }}
- name: Render Book
Expand Down

0 comments on commit aac9a57

Please sign in to comment.