Commit a0735776 authored by Serafino Pirronitto's avatar Serafino Pirronitto
Browse files

Update .gitlab-ci.yml file

parent eeb16d03
Loading
Loading
Loading
Loading
Loading
+19 −10
Original line number Diff line number Diff line
@@ -33,24 +33,34 @@ images_extraction:
    paths:
      - media

chunk_html:
editing_html:
  stage: chunk
  needs:
    - "generate_temp_docx"
    - "images_extraction"
  script:
    - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua  --css=styling.css --css=API.css -s temp.docx -o ./API.zip --toc --toc-depth 4 --template=template.html --split-level=1"
    - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua  --css=styling.css --css=API.css -s temp.docx -o ./editing.zip --toc --toc-depth 4 --template=editing.html --split-level=1"
  artifacts:
    paths:
      - ./API.zip
      - ./editing.zip

official_html:
  stage: chunk
  needs:
    - "generate_temp_docx"
    - "images_extraction"
  script:
    - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua  --css=styling.css --css=API.css -s temp.docx -o ./official.zip --toc --toc-depth 4 --template=official.html --split-level=1"
  artifacts:
    paths:
      - ./official.zip

saving_script:
  stage: chunk
  needs:
    - "chunk_html"
    - "editing_html"
  before_script:
    - unzip ./API.zip -d ./API
    - unzip ./editing.zip -d ./API
    - cp -r ./dist ./API
    - cp pre-save_script.js ./API
  script:
@@ -80,13 +90,12 @@ pages:
    - "saving_script"
    - "images_extraction"
    - "generate_temp_docx"
    - "docx"
    - "official_html"
  script: #copy into public everything it needs to make the page work
    - cp ./API/*.html public/ #html files
    - cp -r ./API public/editing/ #editing_html files
    - cp API.css background_highlight.css public/ #css files
    - cp media/* public/media/ #images
    - cp -r dist/ public/ #javascript files
    - cp html_to_docx_output_fixed.docx public/output_API.docx 
    - cp -r dist/ public/editing/ #javascript files
    - unzip official.zip -d public/official/
    - echo "The site will be deployed to $CI_PAGES_URL"
  artifacts:
    paths: