ref: 1668a9ba4054f378884ab583ad41deff99b4a325 swerc/.gitlab-ci.yml -rw-r--r-- 552 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
stages:
  - deploy

deploy:
  image: alpine
  stage: deploy
  before_script:
    - apk add openssh-client --update --no-cache
    - eval $(ssh-agent -s)
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
  script:
    - ssh -p1337 -o StrictHostKeyChecking=no collector@mle.party "rm -rf /srv/9project/swerc/*"
    - ls
    - scp -P 1337 -r ./* collector@mle.party:/srv/9project/swerc/
  only:
    - master