Skip to content

Commit a7e5612

Browse files
committed
Add pkgdown site
1 parent b3f0b6c commit a7e5612

File tree

5 files changed

+73
-0
lines changed

5 files changed

+73
-0
lines changed

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
^inst/scripts/.*$
77
^\.github$
88
^tools/.*$
9+
^_pkgdown\.yml$
10+
^docs$
11+
^pkgdown$

.github/workflows/pkgdown.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
tags:
7+
-'*'
8+
9+
name: pkgdown
10+
11+
jobs:
12+
pkgdown:
13+
runs-on: macOS-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/setup-r@v1
20+
21+
- uses: r-lib/actions/setup-pandoc@v1
22+
23+
- name: Query dependencies
24+
run: |
25+
install.packages('remotes')
26+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
27+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
28+
shell: Rscript {0}
29+
30+
- name: Restore R package cache
31+
uses: actions/cache@v2
32+
with:
33+
path: ${{ env.R_LIBS_USER }}
34+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
36+
37+
- name: Install dependencies
38+
run: |
39+
remotes::install_deps(dependencies = TRUE)
40+
install.packages("pkgdown", type = "binary")
41+
shell: Rscript {0}
42+
43+
- name: Install package
44+
run: R CMD INSTALL .
45+
46+
- name: Deploy package
47+
run: |
48+
git config --local user.email "[email protected]"
49+
git config --local user.name "GitHub Actions"
50+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ src/*.so
88
src/*.dll
99
inst/doc
1010
CRAN-RELEASE
11+
docs

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2021-07-24 James Balamuta <[email protected]>
2+
3+
* .github/workflows/pkgdown.yaml: Add github actions runner for pkgdown
4+
* _pkgdown.yml: Add pkgdown configuration
5+
* .Rbuildignore: ditto
6+
* .gitignore: ditto
7+
18
2021-07-06 James Balamuta <[email protected]>
29

310
* DESCRIPTION (Version): Release 2.17.0

_pkgdown.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
url: https://coatless.github.io/rcppensmallen
2+
3+
home:
4+
strip_header: true
5+
6+
authors:
7+
James Joseph Balamuta:
8+
href: https://thecoatlessprofessor.com
9+
Dirk Eddelbuettel:
10+
href: https://dirk.eddelbuettel.com/
11+
Ensmallen Developers:
12+
href: https://ensmallen.org/

0 commit comments

Comments
 (0)