Skip to content

modifs cours 4

modifs cours 4 #96

Workflow file for this run

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