-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (54 loc) · 1.64 KB
/
build.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
on:
push:
branches:
- master
name: Render book and slides
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-pandoc@v2
- uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'
- name: Install R dependencies
run: make install
- name: Render slides in html
run: make
- name: Convert slides from html to pdf
run: |
for VARIABLE in `ls -d bloc*`
do
sudo chmod ugo+rwx $VARIABLE
docker run --rm -t -v `pwd`:/slides astefanutti/decktape $VARIABLE/ $VARIABLE/$VARIABLE.pdf
done
- name: Render quarto book
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
path: livre
- name: prepare html and pdf files for deployment
run: |
mkdir slides
cp -r ./assets ./slides
for dir in `ls -d bloc*`
do
mkdir -p ./slides/$dir
cp ./$dir/index.html ./slides/$dir
cp ./$dir/$dir.pdf ./slides/$dir
cp -r ./$dir/assets ./slides/$dir
if [ -d "./$dir/index_files" ]; then cp -r ./$dir/index_files ./slides/$dir; fi
done
cp -r ./livre/_book/* ./slides/
touch ./slides/.nojekyll
- name: Deploy gh_pages
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: slides
single-commit: true