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

34 lines
692 B
YAML

stages:
- fetch-and-build
- deploy
variables:
BRANCH: "develop"
fetch-and-build:
image: python:3.8-alpine
stage: fetch-and-build
artifacts:
paths:
- site/
script:
- apk add git build-base
- python3 -m ensurepip
- pip install pipenv
- pipenv sync
- pipenv run ./manage.sh all --branch $BRANCH
deploy:
image: alpine:latest
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}"