.gitlab-ci.yml 721 Bytes
Newer Older
Davide Depau's avatar
Davide Depau committed
1 2
image: jekyll/builder

Davide Depau's avatar
Davide Depau committed
3 4 5
stages:
  - deploy

Davide Depau's avatar
Davide Depau committed
6 7 8
variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8
9
  GIT_SUBMODULE_STRATEGY: recursive
Davide Depau's avatar
Davide Depau committed
10

11
before_script:
Davide Depau's avatar
Davide Depau committed
12
  - ./scripts/ci_fix_baseurl.sh
13

Davide Depau's avatar
Davide Depau committed
14
deploy-prod:
15 16
  stage: deploy
  script:
Davide Depau's avatar
Davide Depau committed
17
  - apk add rsync
Davide Depau's avatar
Davide Depau committed
18 19
  - bundle install
  - jekyll build -d public
Davide Depau's avatar
Davide Depau committed
20
  - rsync -e "ssh -i $SSH_DEPLOY_KEY" --delete-after -r public/ "sftp://$SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:/www.poul.org/"
Davide Depau's avatar
Davide Depau committed
21 22 23 24
  cache:
    key: gems
    paths:
    - "/usr/local/bundle/cache"
25 26 27 28 29
  only:
  - master

pages:
  stage: deploy
Davide Depau's avatar
Davide Depau committed
30
  script:
Davide Depau's avatar
Davide Depau committed
31 32 33
  - bundle install
  - jekyll build -d public
  - echo "Nothing to do."
Davide Depau's avatar
Davide Depau committed
34 35 36
  artifacts:
    paths:
    - public
Davide Depau's avatar
Davide Depau committed
37 38 39 40
  cache:
    key: gems
    paths:
    - "/usr/local/bundle/cache"
Davide Depau's avatar
Davide Depau committed
41
  only:
42
  - develop