-
Notifications
You must be signed in to change notification settings - Fork 12
82 lines (67 loc) · 2.43 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
on:
push:
pull_request:
branches:
- devel
name: build_deploy
jobs:
build_deploy:
runs-on: ubuntu-latest
container: bioconductor/bioconductor_docker:devel
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out repo
uses: actions/checkout@v3
# No need to install pandoc in this docker container
# - name: Set up pandoc
# uses: r-lib/actions/setup-pandoc@v2
- name: Update apt-get
run: |
sudo apt-get update
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install dependencies
run: |
install.packages(c('remotes', 'BiocManager'))
local_deps <- remotes::local_package_deps(dependencies = TRUE)
deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]], Ncpu = 2L)
shell: Rscript {0}
- name: Session info
run: |
install.packages('sessioninfo')
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
# - name: Render book (git)
# run: |
# bookdown::render_book('index.Rmd', 'bookdown::gitbook')
# shell: Rscript {0}
# - name: Render book (pdf)
# run: |
# bookdown::render_book('index.Rmd', 'bookdown::pdf_book')
# shell: Rscript {0}
# - name: Render book (epub)
# run: |
# bookdown::render_book('index.Rmd', 'bookdown::epub_book')
# shell: Rscript {0}
- name: Render book (bs4_book)
run: |
bookdown::render_book('index.Rmd', 'bookdown::bs4_book')
shell: Rscript {0}
# deploy needs rsync? Seems so.
- name: Install deploy dependencies
if: github.event_name == 'push' && github.ref == 'refs/heads/devel'
run: |
apt-get update && apt-get -y install rsync
- name: Deploy 🚀
if: github.event_name == 'push' && github.ref == 'refs/heads/devel'
uses: JamesIves/[email protected]
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: _book