Skip to content

Commit

Permalink
Update GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed May 26, 2021
1 parent 33ded1b commit fedcf07
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/build-book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,32 @@ jobs:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
id: install-r
with:
crayon.enabled: 'FALSE'

- uses: r-lib/actions/setup-pandoc@v1

- name: Cache R packages
- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ steps.get-r-version.outputs.version }}-1-
path: |
${{ env.R_LIBS_USER }}
!${{ env.R_LIBS_USER }}/pak
key: ${{ runner.os }}-${{ steps.get-r-version.outputs.version }}-3-

- name: Cache bookdown results
uses: actions/cache@v2
with:
path: _bookdown_files
key: bookdown-1-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-1-

- name: Install pak
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
shell: Rscript {0}
key: bookdown-2-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-2-

- name: Install macOS system dependencies
if: runner.os == 'macOS'
Expand All @@ -54,7 +58,8 @@ jobs:
- name: Install dependencies
run: |
pak::local_install_dev_deps()
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("rcmdcheck")
shell: Rscript {0}

- name: Session info
Expand Down

0 comments on commit fedcf07

Please sign in to comment.