-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (52 loc) · 2.26 KB
/
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
55
56
57
58
59
60
61
62
# 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:
# # To publish docs from your branch: list the branch name here instead of main.
# branches: [main]
#pull_request:
# # To publish docs from your branch: list the branch name here instead of main.
# branches: [main]
release:
types: [published]
schedule:
- cron: "42 9 * * *"
workflow_dispatch:
name: pkgdown
jobs:
pkgdown:
runs-on: ubuntu-latest
# This is GitHub Actions magic -- there are no secrets we as package owners need to set up or manage
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v1
with:
working-directory: "apis/r"
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
working-directory: "apis/r"
- name: Set additional repositories (macOS)
if: ${{ matrix.os != 'ubuntu-latest' }}
run: echo 'options(repos = c("https://tiledb-inc.r-universe.dev", getOption("repos")), timeout = 300L)' | tee -a ~/.Rprofile
- name: Set additional repositories (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
rversion <- paste(strsplit(as.character(getRversion()), split = '\\.')[[1L]][1:2], collapse = '.')
codename <- system('. /etc/os-release; echo ${VERSION_CODENAME}', intern = TRUE)
repo <- "https://tiledb-inc.r-universe.dev"
(opt <- sprintf('options(repos = c("%s/bin/linux/%s/%s", "%s", getOption("repos")), timeout = 300L)', repo, codename, rversion, repo))
cat(opt, "\n", file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}
- name: Install tiledb-r
run: cd apis/r && Rscript tools/install-tiledb-r.R
# Run this daily to surface errors as tracked at
# https://github.com/single-cell-data/TileDB-SOMA/issues/2052
- name: Install dependencies
run: ./apis/r/tools/install-pkgdown-dependencies.sh
# Run this on releases, or on workflow dispatch
- name: Deploy package
if: github.event_name != 'schedule'
run: ./apis/r/tools/deploy-pkgdown.sh