Skip to content

Commit f18c077

Browse files
committed
use pkgdown
1 parent 2f9825f commit f18c077

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

.Rbuildignore

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
^\.vscode$
44
^README\.Rmd$
55
^\.github$
6+
^_pkgdown\.yml$
7+
^docs$
8+
^pkgdown$

.github/workflows/pkgdown.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
branches: master
4+
5+
name: pkgdown
6+
7+
jobs:
8+
pkgdown:
9+
runs-on: macOS-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: r-lib/actions/setup-r@master
13+
- uses: r-lib/actions/setup-pandoc@master
14+
- name: Query dependencies
15+
run: |
16+
install.packages('remotes')
17+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
18+
shell: Rscript {0}
19+
20+
- name: Cache R packages
21+
uses: actions/cache@v1
22+
with:
23+
path: ${{ env.R_LIBS_USER }}
24+
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
25+
restore-keys: macOS-r-4.0-1-
26+
27+
- name: Install dependencies
28+
run: |
29+
install.packages("remotes")
30+
remotes::install_deps(dependencies = TRUE)
31+
remotes::install_dev("pkgdown")
32+
shell: Rscript {0}
33+
34+
- name: Install package
35+
run: R CMD INSTALL .
36+
37+
- name: Deploy package
38+
run: pkgdown::deploy_to_branch(new_process = FALSE)
39+
shell: Rscript {0}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.Rhistory
33
.DS_Store
44
.vscode
5+
docs

_pkgdown.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
destination: docs

0 commit comments

Comments
 (0)