.gitlab-ci.yml 542 Bytes
Newer Older
1
deploy:  
Florian Moser's avatar
Florian Moser committed
2
  image: composer:latest
3
4
  only:
    - master
5
  before_script:
Florian Moser's avatar
Florian Moser committed
6
7
8
9
10
11
12
    # install dependencies
    - composer install
  
    # remove dev-time .env
    - rm -d .env

    # setup SSH
13
14
15
16
17
18
19
    - apk add --update openssh-client bash
    - eval $(ssh-agent -s)
    - bash -c 'ssh-add <(echo "$DEPLOY_PRIVKEY")'
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - ssh-keyscan thealternative.ch >> ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
20
  script:
21
    - ssh thealt-website@thealternative.ch 'cd /home/thealt-website/website; git pull'