From fd9b9e0dc34a9da7b34ba67b35068e4519759c88 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Wed, 15 Apr 2020 11:31:10 +0200
Subject: [PATCH] bugfix: do not use dockerbuild for auto gen screenshot

---
 docs/Dockerfile | 34 +---------------------------------
 mkdocs.yml      | 10 ++++++++++
 2 files changed, 11 insertions(+), 33 deletions(-)

diff --git a/docs/Dockerfile b/docs/Dockerfile
index b3c6ad61d..786a18355 100644
--- a/docs/Dockerfile
+++ b/docs/Dockerfile
@@ -1,41 +1,9 @@
-# TODO using dockerfile will not work for readthedocs ... 
-# need to consider how to build for read the docs
-
-FROM xgui3783/pptr-docker:4383e79bc83452e4bdaf098039635c36c55ffb8f as img_autogen
-COPY . /iav
-WORKDIR /iav
-
-# build aot first && install webdriver & pptr
-RUN npm i 
-
-# build-aot
-RUN npm run build-aot
-
-# for selenium web driver
-# RUN apt-get update && apt-get install default-jre -y
-
-# update webdriver
-RUN npm run wd -- update --versions.chrome=80.0.3987.106
-
-# install pptr
-RUN npm i --no-save puppeteer@2.1.0
-
-# install deploy folder
-RUN cd deploy && \
-    npm i
-
-# auto generate screenshots
-RUN npm run e2e -- --specs ./e2e/screenshots/gen.js
-
-
 FROM python:3.7 as builder
 
 COPY . /iav
 WORKDIR /iav
 
-RUN pip install mkdocs mkdocs-material mdx_truly_sane_lists
-
-COPY --from=img_autogen /iav/docs/autogen_images /iav/docs/autogen_images
+RUN pip install mkdocs mkdocs-material mdx_truly_sane_lists errandkun
 
 RUN mkdocs build
 
diff --git a/mkdocs.yml b/mkdocs.yml
index 12153a9d1..9a3bab124 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -14,6 +14,16 @@ markdown_extensions:
   - footnotes
   - mdx_truly_sane_lists
 
+plugins:
+  - search
+  - errandkun:
+      extract_path: docs/autogen_images
+      external_resources:
+      - type: github
+        owner: fzj-inm1-bda
+        repo: interactive-viewer
+        workflow_name: e2e
+
 pages:
   - Home: 'index.md'
   - System requirements: 'requirements.md'
-- 
GitLab