Deploy documentation on self hosted static host

This commit is contained in:
Georg Krause 2022-03-30 12:08:43 +02:00
commit 067adc83f0
No known key found for this signature in database
GPG key ID: 2970D504B2183D22
2 changed files with 20 additions and 19 deletions

View file

@ -240,8 +240,8 @@ build_front:
tags:
- docker
pages:
stage: test
build_documentation:
stage: build
image: python:3.10
variables:
BUILD_PATH: "../public"
@ -268,6 +268,24 @@ pages:
tags:
- docker
deploy_documentation:
stage: deploy
image: alpine
dependencies:
- build_documentation
before_script:
- apk add openssh-client rsync
- mkdir -p ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
script:
- rsync -r -e "ssh -p 2282" $CI_PROJECT_DIR/public/ docs@docs.funkwhale.audio:/htdocs/
only:
- stable
.docker_publish:
stage: deploy
image: egon0/docker-with-buildx-and-git:bash