.gitlab-ci.yml 937 Bytes
Newer Older
1 2 3 4
# Assumes ruby-dev, ruby-bundle, jq and LaTeX are installed in the runner.
# We do not use the Debian package for Jekyll because Buster has only 3.8.3
# (while we want at least 3.8.4).

Houtan Bastani's avatar
Houtan Bastani committed
5
variables:
Houtan Bastani's avatar
Houtan Bastani committed
6
  GIT_SUBMODULE_STRATEGY: normal
Houtan Bastani's avatar
Houtan Bastani committed
7 8
  TERM: linux

Sébastien Villemot's avatar
Sébastien Villemot committed
9
build:
Houtan Bastani's avatar
Houtan Bastani committed
10
  stage: build
Sébastien Villemot's avatar
Sébastien Villemot committed
11 12
  variables:
    JEKYLL_ENV: production
13 14 15 16
    LC_ALL: C.UTF-8
    LANG: en_US.UTF-8
    LANGUAGE: en_US.UTF-8
    GEM_HOME: "$CI_PROJECT_DIR/.gem"
Sébastien Villemot's avatar
Sébastien Villemot committed
17 18
  before_script:
    - gem install jekyll
19 20
    - (cd _data && wget --no-verbose https://www.dynare.org/RePEc/cpm/dynare/wp.yml)
    - ./setup-download-links.sh
Sébastien Villemot's avatar
Sébastien Villemot committed
21
    - bundle install
Houtan Bastani's avatar
Houtan Bastani committed
22
  script:
Houtan Bastani's avatar
Houtan Bastani committed
23
    - (cd assets/images/logo && make)
Houtan Bastani's avatar
Houtan Bastani committed
24
    - bundle exec jekyll build
25 26 27 28
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - .gem/
Houtan Bastani's avatar
Houtan Bastani committed
29 30 31 32
  artifacts:
    paths:
    - _site

Sébastien Villemot's avatar
Sébastien Villemot committed
33 34
deploy:
  stage: deploy
35 36
  only:
    - master@Dynare/website
Sébastien Villemot's avatar
Sébastien Villemot committed
37
  tags:
38
    - restricted
Sébastien Villemot's avatar
Sébastien Villemot committed
39 40 41
  dependencies:
    - build
  script:
42
    - cp -a _site/* /srv/www.dynare.org/