Skip to content

Commit

Permalink
feat: make all is back
Browse files Browse the repository at this point in the history
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
  • Loading branch information
greut committed Oct 4, 2023
1 parent e0711db commit 7d67915
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 34 deletions.
57 changes: 34 additions & 23 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
name: html generation with pandoc
run-name: ${{ github.actor }} is generating new slides
run-name: ${{ github.actor }} is generating new slides
on: [push]

env:
PANDOC_VERSION: 3.1.8
# EMOJIONE_VERSION: 8.0.0
EMOJIONE_VERSION: 8.0.0

jobs:
md2html:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 Job triggered by a ${{ github.event_name }}, running on ${{ runner.os }}"
- run: |
wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb -O pandoc.deb
sudo dpkg -i pandoc.deb
# - run: |
# wget https://github.com/joypixels/emoji-assets/archive/v${EMOJIONE_VERSION}.tar.gz -O emojione-assets.tgz
# tar xf emojione-assets.tgz
# mv emoji-assets-${EMOJIONE_VERSION} emojione-assets
# wget https://raw.githubusercontent.com/mreq/xelatex-emoji/master/xelatexemoji.sty
# wget https://raw.githubusercontent.com/mreq/xelatex-emoji/master/xelatexemoji-flags.sty
# sed -i 's/^\(\\usepackage{amsmath}\)/%\1/' xelatexemoji.sty
# sed -i 's/^\(\\providecommand{\\xelatexemojipath}\)/%\1/' xelatexemoji.sty

- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- run: echo "💡 The branch ${{ github.ref }} from ${{ github.repository }} has been cloned to the runner."

- run: >
apt get install -qy --no-install-recommends
fonts-inconsolata
fonts-linuxlibertine
latex-xcolor
latexmk
librsvg2-bin
lmodern
make
texlive-lang-cjk
texlive-xetex
wget
- run: |
wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb -O pandoc.deb
sudo dpkg -i pandoc.deb
- run: |
wget https://github.com/joypixels/emoji-assets/archive/v${EMOJIONE_VERSION}.tar.gz -O emojione-assets.tgz
tar xf emojione-assets.tgz
mv emoji-assets-${EMOJIONE_VERSION} emojione-assets
wget https://raw.githubusercontent.com/mreq/xelatex-emoji/master/xelatexemoji.sty
wget https://raw.githubusercontent.com/mreq/xelatex-emoji/master/xelatexemoji-flags.sty
sed -i 's/^\(\\usepackage{amsmath}\)/%\1/' xelatexemoji.sty
sed -i 's/^\(\\providecommand{\\xelatexemojipath}\)/%\1/' xelatexemoji.sty
- name: Run the Makefile
run: make slides # XeTeX : I can't find the format file `xelatex.fmt'!
# 2do : https://github.com/pandoc/pandoc-action-example

run: make all

- name: Add index
run: |
echo ${{ github.workspace }}
ls ${{ github.workspace }}
cp ${{ github.workspace }}/templates/index.html ${{ github.workspace }}/build
cp ${{ github.workspace }}/templates/style.css ${{ github.workspace }}/build
echo "🖥️ build dir :"
ls ${{ github.workspace }}/build
cp ./templates/index.html build/
cp ./templates/style.css build/
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $(SLIDES): $(BUILDDIR)/%.html : $(SOURCEDIR)/%.md
sed -e 's/(\(img\/\)/($(SOURCEDIR)\/\1/g' "$^" \
| sed -e "\$$a# Sources" \
| pandoc -s \
-f markdown \
-f markdown \
-t dzslides \
--embed-resources \
--standalone \
Expand Down Expand Up @@ -73,7 +73,7 @@ $(BOOKS): $(BUILDDIR)/%.tex: $(SOURCEDIR)/%.md
-t latex \
--lua-filter=meta.lua \
--lua-filter=english.lua \
--filter=pandoc-citeproc \
--citeproc \
> $@

$(BUILDDIR)/book.pdf: $(TEMPLATES)/book.tex $(BOOKS)
Expand Down
36 changes: 27 additions & 9 deletions templates/book.tex
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@

\usepackage{longtable}
\usepackage{booktabs}


\usepackage{array}

\usepackage{hyperref}
\urlstyle{same}
Expand Down Expand Up @@ -87,7 +86,7 @@
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

\titlehead{2020-2021}
\titlehead{2023-2024}
\subject{Haute-École Arc}
\title{Développement Web}
\subtitle{Technologies d'interaction}
Expand All @@ -110,14 +109,33 @@

\input{templates/header.tex}

\begin{document}

\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newenvironment{cslreferences}%
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
{\par}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\let\oldpar\par
\def\par{\hangindent=\cslhangindent\oldpar}
\fi
% set entry spacing
\setlength{\parskip}{#2\cslentryspacingunit}
}%
{}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}

\usepackage{soul}

\begin{document}

\maketitle

Expand Down

0 comments on commit 7d67915

Please sign in to comment.