Support de la compilation des slides via l'intégration continue et déploiement automatique

Signed-off-by: ynerant <ynerant@crans.org>
This commit is contained in:
ynerant 2021-02-08 19:26:20 +01:00
parent 560e9ee6db
commit d0becd4063
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
5 changed files with 229 additions and 0 deletions

9
.gitignore vendored
View File

@ -4,3 +4,12 @@
.coverage
venv
*.aux
*.log
*.nav
*.out
*.pdf
*.snm
*.synctex.gz
*.toc

View File

@ -1,6 +1,7 @@
stages:
- linting
- test
- compile_slides
flake8:
@ -27,3 +28,22 @@ test:
before_script:
- pip install pytest pytest-cov --no-cache-dir
script: pytest --showlocals --cov=main --cov=main_test --cov-report=term-missing .
slides:
stage: compile_slides
image: aergus/latex
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 0700 ~/.ssh
- ssh-keyscan ynerant.fr >> ~/.ssh/known_hosts
- chmod 0644 ~/.ssh/known_hosts
script:
- latexmk -cd -pdf slides/seminaire-ci.tex
- scp slides/seminaire-ci.pdf gitlab-ci@ynerant.fr:gitlab-ftp/seminaire-ci.pdf
artifacts:
paths:
- slides/seminaire-ci.pdf
expire_in: 1 mo

132
slides/beamerthemecrans.sty Normal file
View File

@ -0,0 +1,132 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%% BEAMER THEME FOR CRANS %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% place in same folder as your .tex
% \usetheme{ens} in preamble
% also need crans-logo.png
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{ensbeamer}[2019/09/04 Beamer Theme]
\RequirePackage{tikz}
\RequirePackage{xcolor}
\makeatletter
\newif\if@section\@sectionfalse
\DeclareOption{sectiontitle}{
\@sectiontrue
}
\ProcessOptions\relax
\definecolor{rougecrans}{RGB}{207,14,34} % rougecrans !
\setbeamercolor{structure}{fg=rougecrans}
%\setbeamercolor{sidebar}{fg=rougecrans,bg=white}
\setbeamercolor{sidebar}{bg=white,fg=rougecrans}
%\setbeamercolor{title in sidebar}{fg=white}
%\setbeamercolor{section in sidebar}{fg=white}
\setbeamercolor{section in sidebar shaded}{fg=rougecrans!40}
\setbeamercolor{subsection in sidebar}{fg=rougecrans}
\setbeamercolor{subsection in sidebar shaded}{fg=rougecrans!60}
\setbeamercolor{frametitle}{fg=rougecrans,bg=white}
\def\swidth{2cm}
%
% -----------------------------
% Title Page
\setbeamerfont{title}{size=\huge}
\setbeamerfont{author}{size=\large}
\setbeamerfont{institut}{size=\Large}
\setbeamerfont{subtitle}{size=\Large}
\setbeamerfont{date}{size=\Large}
\setbeamertemplate{title page}{%
\begin{tikzpicture}[remember picture,overlay]
\fill[white]
(current page.north west) rectangle (current page.south east);
\node
at ([yshift=+.15\textheight]current page.center) (title)
{\usebeamerfont{title}\textcolor{rougecrans}{\inserttitle}};
\node[below=2em]
at(title) (subtitle)
{\usebeamerfont{subtitle}\textcolor{rougecrans}{\insertsubtitle}};
\node
at ([yshift=-70pt]current page.center) (institute)
{\usebeamerfont{institute}\textcolor{rougecrans}{\insertdate}};
\node
at ([yshift=-50pt]current page.center) (author)
{\usebeamerfont{author}\textcolor{rougecrans}{\insertauthor}};
\node [opacity=.15] at (current page.center) {\includegraphics[height=0.9\textheight]{crans-logo} };
\end{tikzpicture}
}
%
% --------------------------------------
% Sidebar
\useoutertheme[height=0pt,width=\swidth, hideothersubsections]{sidebar}
\setbeamertemplate{sidebar left}
{
{\vspace{0.9em}
\hspace{-0.4em}
\begin{minipage}{\swidth}
\centering
\insertlogo
\end{minipage}
\usebeamerfont{title in sidebar}%
\vskip1em%
\usebeamercolor[fg]{title in sidebar}%
\insertshorttitle[width=\swidth,center,respectlinebreaks]\par%
\vskip.5em%
}%
\insertverticalnavigation{\swidth}%
\vfill
\hbox to2cm{\hskip0.6cm\usebeamerfont{section in sidebar} \strut\usebeamercolor[fg]{section in sidebar}\insertframenumber/\inserttotalframenumber\hfill}%
\vskip3pt%
}%
% --------------------------------------------------------------------------
% Section as frame title
\if@section
\addtobeamertemplate{frametitle}{
\let\insertframetitle\insertsectionhead}{}
\addtobeamertemplate{frametitle}{
\let\insertframesubtitle\insertsubsectionhead}{}
\makeatletter
\CheckCommand*\beamer@checkframetitle{\@ifnextchar\bgroup\beamer@inlineframetitle{}}
\renewcommand*\beamer@checkframetitle{\global\let\beamer@frametitle\relax\@ifnextchar\bgroup\beamer@inlineframetitle{}}
\fi
\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamertemplate{navigation symbols}[horizontal]
% ---------------------------------------------------
% BLOC
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercolor{block body}{fg=black,bg=rougecrans!20}
\setbeamercolor{block title}{fg=black,bg=rougecrans!40}
\setbeamercolor{block body example}{fg=black,bg=gray!40}
\setbeamercolor{block title example}{fg=black,bg=gray}
\setbeamercolor{block body alerted}{fg=black,bg=blue!40}
\setbeamercolor{block title alerted}{fg=black,bg=blue}
\setbeamercolor{subitem}{fg=rougecrans!20}
\makeatother
% LOGO :
\logo{\includegraphics[width=\swidth]{crans-logo.png}}

BIN
slides/crans-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

68
slides/seminaire-ci.tex Normal file
View File

@ -0,0 +1,68 @@
\documentclass[handout,aspectratio=169]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[francais]{babel}
\usepackage{graphicx}
\usetheme[sectiontitle]{crans}
\title{Automatisez vos tâches avec une intégration continue}
\subtitle{Séminaire CRANS}
\author[]{\textsc{Yohann D'ANELLO}}
\date{11 février 2021}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}
\tableofcontents[subsubsectionstyle=hide]
\end{frame}
\section{Example}
\subsection{Block}
\begin{frame}
\begin{block}{Title block}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{block}
\begin{block}{}
No title Block \\
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{block}
\begin{exampleblock}{Example Block}
Example text (ugly)
\end{exampleblock}
\begin{alertblock}{Alert Block}
Alert Text
\end{alertblock}
\end{frame}
\subsection{Lists}
\begin{frame}
\begin{itemize}
\item Item 1
\item Item 2
\begin{itemize}
\item Subitem 1
\item Subitem 2
\end{itemize}
\end{itemize}
\begin{enumerate}
\item item 1
\begin{enumerate}
\item item 1.1
\end{enumerate}
\item
\item
\item
\end{enumerate}
\end{frame}
\end{document}