-
Notifications
You must be signed in to change notification settings - Fork 32
70 lines (59 loc) · 1.92 KB
/
vignette.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
64
65
66
67
68
69
70
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
name: vignette
env:
cache-version: "cache-v1"
jobs:
vignette:
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
config:
- { os: macos-latest }
runs-on: ${{ matrix.config.os }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
id: install-r
with:
bioc-version: release
- name: Get R version
id: R
run: |
R --version > VERSION
echo "version=$(head -1 VERSION | awk '{print $3}')" >> $GITHUB_OUTPUT
shell: bash -l {0}
- name: Get Bioconductor version
id: BIOC
run: |
echo "version=$R_BIOC_VERSION" >> $GITHUB_OUTPUT
shell: bash -l {0}
- uses: r-lib/actions/setup-pandoc@v2
- name: Cache R packages
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/Library
key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-${{ steps.BIOC.outputs.version}}-r-${{ steps.R.outputs.version}}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-${{ steps.BIOC.outputs.version}}-r-${{ steps.R.outputs.version}}-
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
- name: Install package
run: R CMD INSTALL .
- name: Build and deploy pkgdown site
if: github.actor == 'zktuong' && github.repository == 'zktuong/ktplots'
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
shell: bash -l {0}