From b88a3877f72604e69f89d554f3ddb7b4f06a9c4c Mon Sep 17 00:00:00 2001
From: Quentin Guilloteau <Quentin.Guilloteau@inria.fr>
Date: Wed, 12 Apr 2023 13:06:06 +0200
Subject: [PATCH] ci for slides

---
 .gitlab-ci.yml                   | 11 ++++++++++-
 flake.nix                        | 11 +++++++++++
 pages/src/intro.md               |  2 ++
 update_and_push_docker_images.sh |  8 ++------
 4 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 44b8012..0fa91f9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,15 @@
-image: registry.gitlab.inria.fr/control-for-computing/tutorial/doc:v0.0
 
+slides:
+  image: registry.gitlab.inria.fr/control-for-computing/tutorial/slides:v0.0
+  script:
+    - chown root $(pwd)
+    - nix build .#slides
+    - mv ./result/slides.pdf ./slides.pdf
+  artifacts:
+    paths:
+      - ./slides.pdf
 pages:
+  image: registry.gitlab.inria.fr/control-for-computing/tutorial/doc:v0.0
   script:
     - chown root $(pwd)
     - mkdir .public
diff --git a/flake.nix b/flake.nix
index 1cb78b8..81f1904 100644
--- a/flake.nix
+++ b/flake.nix
@@ -58,6 +58,17 @@
           '';
         };
 
+        slides-docker = pkgs.dockerTools.buildImageWithNixDb {
+          name = "registry.gitlab.inria.fr/control-for-computing/tutorial/slides";
+          tag = version;
+          fromImage = flakeImage;
+          contents = with pkgs; [ 
+            texlive.combined.scheme-full
+            pandoc
+            rubber
+          ];
+        };
+
 
       };
       devShells.${system} = {
diff --git a/pages/src/intro.md b/pages/src/intro.md
index 608ba1d..623a283 100644
--- a/pages/src/intro.md
+++ b/pages/src/intro.md
@@ -2,6 +2,8 @@
 
 Link to this page: [https://tinyurl.com/CtrlComputing](https://tinyurl.com/CtrlComputing)
 
+Link to the slides: [here](https://gitlab.inria.fr/control-for-computing/tutorial/-/jobs/artifacts/master/raw/slides.pdf?job=slides)
+
 ## Introduction
 
 This tutorial aims at introducing the tools and notions of the [Control-Theory field](https://en.wikipedia.org/wiki/Control_theory) to computer scientists, and relies on [Jupyter notebooks](https://jupyter.org/), and is composed of two parts:
diff --git a/update_and_push_docker_images.sh b/update_and_push_docker_images.sh
index 1f37201..b0714a9 100644
--- a/update_and_push_docker_images.sh
+++ b/update_and_push_docker_images.sh
@@ -1,13 +1,9 @@
 
 VERSION=$1
 
-nix build .#tuto-py-docker
+nix build .#slides-docker
 docker load < result
-docker push registry.gitlab.inria.fr/control-for-computing/tutorial/tuto:$VERSION
-
-nix build .#tuto-system-docker
-docker load < result
-docker push registry.gitlab.inria.fr/control-for-computing/tutorial/system:$VERSION
+docker push registry.gitlab.inria.fr/control-for-computing/tutorial/slides:$VERSION
 
 nix build .#tuto-doc-docker
 docker load < result
-- 
GitLab