Skip to content

Commit bfa4bfa

Browse files
committed
setup github action for building lgr docs
1 parent 276a811 commit bfa4bfa

File tree

4 files changed

+51
-1
lines changed

4 files changed

+51
-1
lines changed

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/pkgdown.yaml

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

_pkgdown.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ reference:
4040
contents:
4141
- LogEvent
4242
- as.data.frame.LogEvent
43+
- as_event_list
4344
- print.LogEvent
4445
- title: Filters
4546
desc: Filter events passed to Appenders or Loggers

vignettes/lgr.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Yet Another Log4j Inspired Logging Framework"
2+
title: "lgr: A fully featured logging framework for R"
33
author: "Stefan Fleck"
44
date: "`r Sys.Date()`"
55
output:

0 commit comments

Comments
 (0)