-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.36 KB
/
build-pkgdown.yaml
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
on:
push:
branches:
- master
workflow_dispatch:
name: Build pkgdown
jobs:
build:
name: Build pkgdown
runs-on: ubuntu-latest
container: bioconductor/bioconductor_docker:devel
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get update
sudo apt-get install -y rsync
- uses: r-lib/actions/setup-pandoc@v2
- name: Set directories
run: |
echo "R_PKG_DIR=${R_HOME}/site-library" >> $GITHUB_ENV
- name: Restore the package directory
uses: actions/cache@v4
with:
path: ${{ env.R_PKG_DIR }}
key: pkgdown-packages
- name: Install dependencies
shell: Rscript {0}
run: |
stuff <- read.dcf("DESCRIPTION")
stuff <- stuff[,intersect(colnames(stuff), c("Imports", "LinkingTo", "Suggests", "Depends"))]
deps <- sub(" .*", "", unlist(strsplit(stuff, ",\\s*"), use.names=FALSE))
BiocManager::install(c("pkgdown", deps))
- name: Install self
run: R CMD INSTALL .
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- name: Deploy to GitHub pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
branch: gh-pages
folder: docs