Skip to content

Commit d2897c8

Browse files
committed
add _pkgdown.yml and .github/workflows/pr_check.yml GHA
0 parents  commit d2897c8

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

.github/workflows/pr_check.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: PR CMD check & build site
2+
3+
on:
4+
push:
5+
paths:
6+
- 'DESCRIPTION'
7+
- '**.yml'
8+
branches:
9+
- RELEASE_3_21
10+
- pkgdown
11+
12+
env:
13+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
CRAN: https://p3m.dev/cran/__linux__/noble/latest
16+
BIOC_RELEASE: RELEASE_3_21
17+
18+
jobs:
19+
check:
20+
runs-on: ubuntu-latest
21+
container: bioconductor/bioconductor_docker:RELEASE_3_21
22+
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ env.BIOC_RELEASE }}
28+
29+
- name: Copy .github and _pkgdown.yml
30+
run: |
31+
git config --global --add safe.directory /__w/BiocParallel/BiocParallel
32+
git fetch origin pkgdown
33+
git checkout origin/pkgdown -- .github
34+
git checkout origin/pkgdown -- _pkgdown.yml
35+
36+
- name: Query dependencies
37+
run: |
38+
BiocManager::install(c("covr", "BiocCheck"))
39+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
40+
shell: Rscript {0}
41+
42+
- name: Cache R packages
43+
uses: actions/cache@v4
44+
with:
45+
path: /usr/local/lib/R/site-library
46+
key: ${{ runner.os }}-r-${{ env.BIOC_RELEASE }}-${{ hashFiles('.github/depends.Rds') }}
47+
restore-keys: ${{ runner.os }}-r-${{ env.BIOC_RELEASE }}-
48+
49+
- name: Install Dependencies
50+
run: |
51+
remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories())
52+
BiocManager::install(c("rcmdcheck", "BiocCheck"), ask = FALSE, update = TRUE)
53+
shell: Rscript {0}
54+
55+
- name: Check Package
56+
env:
57+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
58+
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error", check_dir = "check")
59+
shell: Rscript {0}
60+
61+
- name: Run BiocCheck
62+
id: bioccheck
63+
run: |
64+
BiocCheck::BiocCheck(
65+
dir('check', 'tar.gz$', full.names = TRUE),
66+
`quit-with-status` = TRUE, `no-check-bioc-help` = TRUE
67+
)
68+
shell: Rscript {0}
69+
70+
- name: Build pkgdown
71+
run: |
72+
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site()'
73+
74+
- name: Upload pkgdown artifact
75+
uses: actions/upload-pages-artifact@v3
76+
with:
77+
path: docs
78+
79+
deploy:
80+
needs: check
81+
permissions:
82+
contents: write
83+
pages: write
84+
id-token: write
85+
runs-on: ubuntu-24.04
86+
87+
steps:
88+
- name: Deploy to GitHub Pages
89+
id: deployment
90+
uses: actions/deploy-pages@v4
91+

_pkgdown.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: AnnotationHub
2+
url: https://waldronlab.github.io/AnnotationHub
3+
4+
template:
5+
bootstrap: 5
6+
params:
7+
bootswatch: flatly

0 commit comments

Comments
 (0)