Skip to content

Commit

Permalink
Merge pull request #13 from wch/gh-update
Browse files Browse the repository at this point in the history
  • Loading branch information
wch authored Aug 19, 2022
2 parents f733c1a + 94665d5 commit 51d1023
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$
41 changes: 12 additions & 29 deletions .github/workflows/build-book.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- master
branches: [main, master]
pull_request:
branches:
- master
branches: [main, master]
schedule:
# run every day at 11 PM
- cron: '0 23 * * *'
# run every day at 11:05 PM Pacific
- cron: '5 7 * * *'
workflow_dispatch:

name: build-book

Expand All @@ -18,33 +19,15 @@ jobs:
build:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
runs-on: macOS-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- uses: actions/checkout@v2

- name: Setup R
uses: r-lib/actions/setup-r@master

- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@master

- name: Cache R packages
uses: actions/cache@v1
- uses: r-lib/actions/setup-r@v2
with:
path: ${{ env.R_LIBS_USER }}
key: r-5-${{ hashFiles('DESCRIPTION') }}
restore-keys: r-5-

- name: Install pak
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
shell: Rscript {0}
use-public-rspm: true

- name: Install dependencies
run: |
pak::local_install_dev_deps()
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2

- name: Cache bookdown results
uses: actions/cache@v1
Expand Down

0 comments on commit 51d1023

Please sign in to comment.