-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (49 loc) · 1.59 KB
/
renderbook.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
on:
pull_request:
branches: [ gh-pages ]
types: [ closed ]
name: renderbook
jobs:
bookdown:
name: Render-Book
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install rmarkdown
run: Rscript -e 'install.packages(c("rmarkdown","bookdown","HelpersMG","readr"))'
- uses: r-lib/actions/setup-tinytex@v2
- name : install tinytex
run: tlmgr --version
- name: Render Book
run: |
Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook", output_dir="docs")'
- uses: actions/upload-artifact@v4
with:
name: renderbook_output
path: docs/
# deploy to gh pages yml
build-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v4
with:
name: renderbook_output
path: renderbook_output
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: renderbook_output
target-folder: docs # The folder the action should deploy.
clean: true