-
Notifications
You must be signed in to change notification settings - Fork 21
58 lines (48 loc) · 1.74 KB
/
render_book.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
name: Publish Quarto book
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-deploy:
name: Render & publish Quarto book
runs-on: macOS-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
# with:
# tinytex: true # for pdf but buggy on finding version
# - name: Install chromium for Quarto
# # for rendering Mermaid diagrams to pdf: https://quarto.org/docs/authoring/diagrams.html#chrome-install
# run: quarto install chromium
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install librsvg
# convert svg to png for pdf
run: brew install librsvg
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.1' # 2024-09-04
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
- name: Prep files for Quarto render
# copy eDNA README.md to .qmd (placeholder for _quarto.yml)
# necessary for `quarter render` to work, and before pre-render script overwrites .qmd
run: cp datasets/dataset-edna/README.md datasets/dataset-edna/README.qmd
- name: Quarto Render and Publish
# TODO: `quarto publish gh-pages` https://quarto.org/docs/publishing/github-pages.html#publishing
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}