-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.71 KB
/
r-cmd-check.yaml
File metadata and controls
63 lines (52 loc) · 1.71 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
on: [push, pull_request]
name: R CMD check
jobs:
check:
name: R CMD check
runs-on: ubuntu-latest
container: bioconductor/bioconductor_docker:devel
steps:
- uses: actions/checkout@v3
- name: Set directories
run: |
echo "R_PKG_DIR=${R_HOME}/site-library" >> $GITHUB_ENV
- name: Restore the package directory
uses: actions/cache@v3
with:
path: ${{ env.R_PKG_DIR }}
key: installed-packages-${{ hashFiles('**/DESCRIPTION') }}
- name: Install dependencies
shell: Rscript {0}
run: |
deps <- remotes::local_package_deps(pkgdir = ".", dependencies=TRUE)
BiocManager::install(deps)
- name: Build the package
run: R CMD build .
- name: Test the package
run: |
tarball=$(ls *.tar.gz)
R CMD check --no-manual $tarball
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
# The remaining steps we only run on the master branch.
- name: Install system dependencies
if: github.ref == 'refs/heads/master'
run: |
sudo apt-get update
sudo apt-get install -y rsync
- name: Install ourselves
if: github.ref == 'refs/heads/master'
run: R CMD INSTALL .
- name: Run pkgdown
if: github.ref == 'refs/heads/master'
shell: Rscript {0}
run: |
BiocManager::install("pkgdown")
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
- name: Deploy to GitHub pages 🚀
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4.4.0
with:
clean: false
branch: gh-pages
folder: docs