.gitlab-ci.yml 697 Bytes
Newer Older
1
image: framasoft/framadate-ci
2 3 4 5

pages:
  stage: deploy
  script:
Thomas Citharel's avatar
Thomas Citharel committed
6 7 8 9 10 11
  - mkdir "${HOME}/.ssh"
  - chmod 700 "${HOME}/.ssh"
  # The following is stupid but required for some reason
  - mkdir .public
  - cp -r * .public
  - mv .public public
12
  - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
Thomas Citharel's avatar
Thomas Citharel committed
13
  - eval `ssh-agent -s`
14 15
  - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); fi
  - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then rsync -a --delete --exclude stats/ --exclude error/ public/ ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/; fi
16 17 18 19 20
  artifacts:
    paths:
    - public
  only:
  - master