@@ -10,19 +10,41 @@ name: pkgdown
10
10
jobs :
11
11
pkgdown :
12
12
runs-on : macOS-latest
13
+ env :
14
+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
13
15
steps :
14
16
- uses : actions/checkout@v2
17
+
15
18
- uses : r-lib/actions/setup-r@master
19
+
16
20
- uses : r-lib/actions/setup-pandoc@master
21
+
22
+ - name : Query dependencies
23
+ run : |
24
+ install.packages('remotes')
25
+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
26
+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
27
+ shell : Rscript {0}
28
+
29
+ - name : Cache R packages
30
+ uses : actions/cache@v1
31
+ with :
32
+ path : ${{ env.R_LIBS_USER }}
33
+ key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
34
+ restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
35
+
17
36
- name : Install dependencies
18
37
run : |
19
- install.packages("remotes")
20
38
remotes::install_deps(dependencies = TRUE, type = "binary")
21
39
remotes::install_github("tidyverse/tidytemplate")
22
40
remotes::install_dev("pkgdown")
23
41
shell : Rscript {0}
42
+
24
43
- name : Install package
25
44
run : R CMD INSTALL .
45
+
26
46
- name : Deploy package
27
- run : pkgdown::deploy_to_branch(new_process = FALSE)
28
- shell : Rscript {0}
47
+ run : |
48
+ git config --local user.email "actions@github.com"
49
+ git config --local user.name "GitHub Actions"
50
+ Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
0 commit comments