Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.14 KiB
Newer Older
Fabian Gabel's avatar
Fabian Gabel committed
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/plain-html
  - build
# always test the preprocessor and pandoc build with unit tests
testing:
  stage: preprocessor-test
  allow_failure: false
  image: 
    name: alpine:latest
  script:
    - apk add --no-cache --upgrade bash
    - RESEARCH_ROOT=`pwd`; export RESEARCH_ROOT;
    # run shell script with testss
    - $RESEARCH_ROOT/bin/run-tests.sh
  artifacts:
    paths:
      - testing/*.log

build-static:
  stage: build
  allow_failure: false
  image: 
    name: eltenedor/ubuntu-pandoc:latest
  script:
    - RESEARCH_ROOT=`pwd`; export RESEARCH_ROOT;
    # build static webpage
    - $RESEARCH_ROOT/bin/build_static.sh
  artifacts:
    paths:
      - static

# deploy static webpage to web-server via GitLab pages
Fabian Gabel's avatar
Fabian Gabel committed
pages:
  stage: deploy
  script:
    - mkdir .public
    - cp -r static/public/*.html .public
    - cp -r img .public/.
    - cp -r css .public/.
Fabian Gabel's avatar
Fabian Gabel committed
    - mv .public public
  artifacts:
    paths:
      - public
  rules:
Fabian Gabel's avatar
Fabian Gabel committed
    - if: $CI_COMMIT_BRANCH == 'master'