-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (83 loc) · 2.34 KB
/
Copy pathrender.yml
File metadata and controls
92 lines (83 loc) · 2.34 KB
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
83
84
85
86
87
88
89
90
91
92
---
name: Render and Deploy to GitHub Pages
on:
push:
branches: [main]
jobs:
render:
runs-on: ubuntu-latest
container:
image: rocker/verse:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install LaTeX packages to render PDF outputs
run: >-
Rscript -e
'tinytex::tlmgr_install(c(
"adjustbox",
"amsfonts",
"booktabs",
"caption",
"enumitem",
"eurosym",
"float",
"fontspec",
"grffile",
"jknapltx",
"pdfcol",
"rsfs",
"soul",
"tcolorbox",
"titling",
"ulem",
"unicode-math",
"upquote"
))'
- name: Install RStan and dependencies
run: >-
Rscript -e
'pak::local_install_deps("stanodeffr", dependencies = TRUE)'
- name: Install cmdstanpy and dependencies
run: |-
cd stanodeffpy/
wget -qO- https://astral.sh/uv/install.sh | sh
. $HOME/.local/bin/env
uv sync
- name: Render RMarkdown into all output formats
run: >-
Rscript -e '
rmarkdown::render(
"stanodeffr/01-stan-ode-forcing-function.Rmd",
output_format = "all",
output_dir = "public/r"
)
'
- name: Render Jupyter notebook into all output formats
run: |-
cd stanodeffpy/
. $HOME/.local/bin/env
uv run jupyter execute --inplace 01-stan-ode-forcing-function.ipynb
for format in markdown html python pdf; do
uv run \
jupyter nbconvert \
--output-dir ../public/python \
--to $format \
01-stan-ode-forcing-function.ipynb
done
- name: Create index.html pages to see all vignette files
run: |
cd public/
apt update
apt -y install tree
tree -H '.' \
-T 'Vignettes for Stan ODE forcing function' \
-I index.html \
-I 01-stan-ode-forcing-function_files \
--noreport \
--houtro "" \
-o index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}