This repository has been archived on 2022-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
docs/.gitlab-ci.yml
2019-12-09 04:05:53 +03:00

31 lines
666 B
YAML

stages:
- fetch-and-build
- deploy
variables:
BRANCH: "develop"
image: alpine:latest
fetch-and-build:
stage: fetch-and-build
artifacts:
paths:
- site/
script:
- apk add git python3
- python3 -m ensurepip
- pip3 install mkdocs mkdocs-material markdown-include
- ./manage.sh all --branch $BRANCH
deploy:
stage: deploy
only:
- master@pleroma/docs
script:
- 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 -
- rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" site/* "${SSH_USER_HOST_LOCATION}/${BRANCH}"