-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.36 KB
/
document-style.yml
File metadata and controls
48 lines (41 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: document-style
jobs:
document-style:
name: document-style
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.PAT_GITHUB }}
steps:
- uses: actions/checkout@v2
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Add INLA repo
run: |
writeLines('options(repos = c(INLA = "https://inla.r-inla-download.org/R/testing/", getOption(\"repos\")))', file("~/.Rprofile", "ab"))
shell: Rscript {0}
- name: Set up Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::roxygen2
any::styler
- name: Document
run: Rscript -e 'roxygen2::roxygenise()'
- name: Style
run: Rscript -e 'styler::style_pkg()'
- name: commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/\* NAMESPACE
git add \*.R
git commit -m 'Document and style'