-
Notifications
You must be signed in to change notification settings - Fork 4
80 lines (66 loc) · 1.87 KB
/
render-bookdown.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
71
72
73
74
75
76
77
78
79
80
on:
push:
branches:
- master
- development
pull_request:
branches:
- master
- development
name: Render bookdown website
jobs:
bookdown:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
Ncpus: 2
use-public-rspm: false
- uses: r-lib/actions/setup-pandoc@v2
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
env:
# install full prebuilt version
TINYTEX_INSTALLER: TinyTeX
- name: Install package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
packages: |
any::rcmdcheck
any::rmarkdown
any::bookdown
any::htmlwidgets
- name: Render Bookdown
run: |
source(".github/workflows/render.R", echo = TRUE)
shell: Rscript {0}
- uses: actions/upload-artifact@v2
with:
name: _book
path: _book/
checkout-and-deploy:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: ubuntu-20.04
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v2
with:
# Artifact name
name: _book # optional
# Destination path
path: _book # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build_dir: _book
branch: gh-pages