framadate-responsive/.gitlab-ci.yml
2018-10-26 11:11:05 +02:00

23 lines
757 B
YAML

image: alpine:latest
pages:
stage: deploy
before_script:
- apk --update add openssh-client && apk add bash
script:
- mkdir "${HOME}/.ssh"
- chmod 700 "${HOME}/.ssh"
# The following is stupid but required for some reason
- mkdir .public
- cp -r * .public
- mv .public public
- if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
- eval `ssh-agent -s`
- 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
artifacts:
paths:
- public
only:
- master