.gitlab-ci.yml 1.08 KB
Newer Older
mazenovi's avatar
mazenovi committed
1
image: ubuntu:xenial
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

cache:
  paths:
    - output/ # Node modules and dependencies

before_script:
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
  - ssh-add <(echo "$SSH_PRIVATE_KEY")
  - mkdir -p ~/.ssh
  - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

build:
  stage: build
  script:
mazenovi's avatar
mazenovi committed
17
    - apt-get install -y --force-yes build-essential python-dev python-pip git nodejs nodejs-legacy npm
mazenovi's avatar
fix ci    
mazenovi committed
18
    - pip install --upgrade pip==9.0.3
19
    - pip install -r requirements.txt
m4z3 test's avatar
m4z3 test committed
20
    - cd content && npm install && cd ..
mazenovi's avatar
mazenovi committed
21
    - sed -i "s/RELATIVE_URLS = True/RELATIVE_URLS = False/" pelicanconf.py
mazenovi's avatar
mazenovi committed
22
23
24
25
26
    - apt-get install -y --force-yes locales
    - locale-gen fr_FR
    - locale-gen fr_FR.UTF-8
    - update-locale LANG=fr_FR.UTF-8
    - . /etc/default/locale
27
28
29
30
31
32
33
34
35
36
    - pelican content

  artifacts:
    untracked: true

deploy:
  stage: deploy
  dependencies:
    - build
  script:
mazenovi's avatar
mazenovi committed
37
38
    - apt-get install -y --force-yes rsync
    - rsync -az --exclude '_' -e ssh output/ $USERNAME@$HOST:~/public_html/
Vincent Mazenod's avatar
Vincent Mazenod committed
39
  when: manual