diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..8ad7206c77d3d6124a6aa762f1fa96d0a2a1eb90
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,47 @@
+image: aergus/latex
+
+variables:
+  FILENAME: main
+  FILEDIR: .
+  DIFFCMD: bash git-latexdiff --exclude-textcmd="section,subsection,author" -b --main $FILENAME.tex --latexmk
+
+stages:
+  - build
+  - diff
+
+build:
+  stage: build
+  tags:
+    - dockered
+  artifacts:
+    paths:
+      - $FILEDIR/paper.pdf
+      - $FILEDIR/build_paper.log
+  script:
+    - cd "$FILEDIR"
+    - latexmk -pdf "$FILENAME.tex" 2>&1 | tee build_paper.log
+    - bash -c 'mv $FILENAME.pdf paper.pdf; true'
+# - 'grep -v "LaTeX Warning: There were undefined references." build_paper.log'
+
+# diff is not working most of the time
+# diff:
+#   stage: diff
+#   tags:
+#     - dockered
+#   artifacts:
+#     paths:
+#       - $FILEDIR/difftag_paper.pdf
+#       - $FILEDIR/difftag_paper.log
+#       - $FILEDIR/diffcommit_paper.pdf
+#   script:
+#     - cd "$FILEDIR"
+#     - LAST_TAG=$(git describe --abbrev=0 --tags HEAD~1)
+#     - wget https://gitlab.com/git-latexdiff/git-latexdiff/raw/ef53cddc761ce2d278ba5016d17828cf63e30af5/git-latexdiff
+#     - if [ "$LAST_TAG" ] ; then
+#     -   $DIFFCMD -o "difftag_paper.pdf" "$LAST_TAG" 2>&1 | tee difftag_paper.log
+#     - fi
+#     - if [ "$CI_BEFORE_SHA" ] ; then
+#     -   $DIFFCMD -o "diffcommit_paper.pdf" "$CI_BEFORE_SHA"
+#     - fi
+#   allow_failure: true
+
diff --git a/README.md b/README.md
index d02bf9464119869e7ce3b7094233ae1b78babcc1..6b1e379f125991ad63225449429e28f1298cf8ed 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
+[![pipeline status](/../badges/master/pipeline.svg)](/../pipelines)
+
+* [Latest PDF online](/../-/jobs/artifacts/master/file/paper.pdf?job=build)
+    * [Build Log](/../-/jobs/artifacts/master/file/build_paper.log?job=build)
+
 # Deep modeling for self-reproducing robots
 > This is a paper about how to use deep modeling to describe a self-reproducing robots control system