-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (52 loc) · 2.06 KB
/
roxygenize.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# The purpose of this action is to run `document()` of the roxygen2 package on each commit.
# If new documentation was generated, it will automatically add a commit to the current branch.
# This has the same effect as running `document()` locally, but
# * ensures it cannot be forgotten
# * saves setting up the development environment locally, which is especially useful for new contributors.
#
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
pull_request:
paths: ["R/**", ".github/workflows"]
name: Document
jobs:
document:
runs-on: ubuntu-latest # self-hosted
env:
GITHUB_PAT: ${{ secrets.TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
# extra token required to trigger github actions again on commit
token: ${{ secrets.TOKEN }} # BOT_GH_TOKEN
- name: Update system dependencies
run: |
sudo apt-get update && sudo apt-get install \
libcurl4-openssl-dev -y
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install pak
run: Rscript -e "install.packages('pak', repos='https://cran.rstudio.com/')"
#- name: Install SpatialExperiment
# run: Rscript -e "pak::pkg_install('drighelli/SpatialExperiment')"
- name: Install Devtools
run: Rscript -e "pak::pkg_install('devtools')"
- name: Install SpatialExperiment
run: Rscript -e "devtools::install_github('drighelli/SpatialExperiment')"
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"' # do not install suggests
extra-packages: any::roxygen2
needs: roxygen2
- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Roxygenize