.gitlab-ci.yml 691 Bytes
Newer Older
rinpatch's avatar
rinpatch committed
1
stages:
rinpatch's avatar
rinpatch committed
2
- fetch-and-build
rinpatch's avatar
rinpatch committed
3 4 5 6 7 8 9
- deploy

variables:
  BRANCH: "develop"

image: alpine:latest

rinpatch's avatar
rinpatch committed
10 11
fetch-and-build:
 stage: fetch-and-build
rinpatch's avatar
rinpatch committed
12 13
 artifacts:
   paths:
rinpatch's avatar
rinpatch committed
14
   - site/
rinpatch's avatar
rinpatch committed
15
 script:
16
 - apk add git python3 gcc python3-dev musl-dev
rinpatch's avatar
rinpatch committed
17
 - python3 -m ensurepip
rinpatch's avatar
rinpatch committed
18
 - pip3 install mkdocs mkdocs-material markdown-include
rinpatch's avatar
rinpatch committed
19
 - ./manage.sh all --branch $BRANCH
rinpatch's avatar
rinpatch committed
20 21 22

deploy:
  stage: deploy
rinpatch's avatar
rinpatch committed
23 24
  only:
  - master@pleroma/docs
rinpatch's avatar
rinpatch committed
25
  script:
26 27 28 29 30
  - apk update && apk add openssh-client rsync
  - mkdir -p ~/.ssh
  - echo "${SSH_HOST_KEY}" > ~/.ssh/known_hosts
  - eval $(ssh-agent -s)
  - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
rinpatch's avatar
rinpatch committed
31
  - rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" site/* "${SSH_USER_HOST_LOCATION}/${BRANCH}"