-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.95 KB
/
build_deploy.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
name: pkgdown
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container: bioconductor/bioconductor_docker:RELEASE_3_19
steps:
## Most of these steps are the same as the ones in
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
## If they update their steps, we will also need to update ours.
- uses: actions/checkout@v2
- name: Install rcmdcheck
run: |
install.packages('rcmdcheck')
install.packages("BiocManager")
BiocManager::install("RforMassSpectrometry/MsBackendMetaboLights")
BiocManager::install("RforMassSpectrometry/MsIO")
shell: Rscript {0}
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'error', check_dir = 'check')"
shell: bash {0}
- name: Install deploy dependencies
run: |
apt-get update
apt-get -y install rsync
- name: Install pkgdown
if: github.ref == 'refs/heads/main'
run: |
install.packages('pkgdown')
shell: Rscript {0}
- name: Install package
if: github.ref == 'refs/heads/main'
run: R CMD INSTALL .
- name: Deploy package
if: github.ref == 'refs/heads/main'
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git config --global --add safe.directory /__w/metabonaut/metabonaut
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
shell: bash {0}
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
## at least one locally before this will work. This creates the gh-pages
## branch (erasing anything you haven't version controlled!) and
## makes the git history recognizable by pkgdown.