.gitlab-ci.yml 647 Bytes
Newer Older
1 2 3 4
stages:
  - build
  - deploy

fnux's avatar
fnux committed
5
image: code.ungleich.ch:5050/ungleich-public/ungleich-staticcms:latest
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
variables:
  BUILDDIR: "build/"

build:
  stage: build
  script:
    - make build
  artifacts:
    expire_in: 12 hours
    paths:
      - "build/"

deploy:
  stage: deploy
  only:
    - master
  environment:
    name: production
    url: https://ungleich.ch/
  before_script:
    # Configure the SSH Agent
    - eval $(ssh-agent -s)
    - echo "$CD_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - mkdir -p ~/.ssh
    - echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
  script:
    - make deploy