31 lines
666 B
YAML
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}"
|