Skip to content

Commit 51d1023

Browse files
authored
Merge pull request #13 from wch/gh-update
2 parents f733c1a + 94665d5 commit 51d1023

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$

.github/workflows/build-book.yaml

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
13
on:
24
push:
3-
branches:
4-
- master
5+
branches: [main, master]
56
pull_request:
6-
branches:
7-
- master
7+
branches: [main, master]
88
schedule:
9-
# run every day at 11 PM
10-
- cron: '0 23 * * *'
9+
# run every day at 11:05 PM Pacific
10+
- cron: '5 7 * * *'
11+
workflow_dispatch:
1112

1213
name: build-book
1314

@@ -18,33 +19,15 @@ jobs:
1819
build:
1920
env:
2021
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
21-
runs-on: macOS-latest
22+
runs-on: ubuntu-latest
2223
steps:
23-
- name: Checkout repo
24-
uses: actions/checkout@master
24+
- uses: actions/checkout@v2
2525

26-
- name: Setup R
27-
uses: r-lib/actions/setup-r@master
28-
29-
- name: Setup pandoc
30-
uses: r-lib/actions/setup-pandoc@master
31-
32-
- name: Cache R packages
33-
uses: actions/cache@v1
26+
- uses: r-lib/actions/setup-r@v2
3427
with:
35-
path: ${{ env.R_LIBS_USER }}
36-
key: r-5-${{ hashFiles('DESCRIPTION') }}
37-
restore-keys: r-5-
38-
39-
- name: Install pak
40-
run: |
41-
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
42-
shell: Rscript {0}
28+
use-public-rspm: true
4329

44-
- name: Install dependencies
45-
run: |
46-
pak::local_install_dev_deps()
47-
shell: Rscript {0}
30+
- uses: r-lib/actions/setup-r-dependencies@v2
4831

4932
- name: Cache bookdown results
5033
uses: actions/cache@v1

0 commit comments

Comments
 (0)