-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (61 loc) · 1.73 KB
/
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
on:
push:
branches:
- master
name: bookdown
jobs:
renderbook:
runs-on: macOS-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
env:
GITHUB_PAT: ${{ secrets.GH_PAT }}
run: |
options(pkgType = "binary")
options(install.packages.check.source = "no")
install.packages(c("distill", "downlit", "memoiR", "rmdformats", "tinytex"))
tinytex::install_tinytex(bundle = "TinyTeX")
tinytex::tlmgr_install(c("tex-gyre", "tex-gyre-math"))
shell: Rscript {0}
- name: Render pdf book
env:
GITHUB_PAT: ${{ secrets.GH_PAT }}
run: |
bookdown::render_book("index.Rmd", "bookdown::pdf_book")
shell: Rscript {0}
- name: Render bs4 book
env:
GITHUB_PAT: ${{ secrets.GH_PAT }}
run: |
bookdown::render_book("index.Rmd", "bookdown::bs4_book")
shell: Rscript {0}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: _book
path: docs/
deploy:
runs-on: ubuntu-latest
needs: renderbook
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
# Artifact name
name: _book
# Destination path
path: docs
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
with:
email: ${{ secrets.EMAIL }}
build_dir: docs
jekyll: no