From 195fb2d8fb1134f33c5ee9e8aed31bcafe35d784 Mon Sep 17 00:00:00 2001 From: jo Date: Sat, 28 Jan 2023 21:37:55 +0100 Subject: [PATCH] ci: rework deploy_docs job Part-of: --- .gitlab-ci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad61b4fbc..8f9fdfd57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,8 @@ include: file: /templates/pre-commit.yml - project: funkwhale/ci file: /templates/lychee.yml + - project: funkwhale/ci + file: /templates/ssh-agent.yml variables: PYTHONDONTWRITEBYTECODE: "true" @@ -335,22 +337,17 @@ build_api: - api deploy_docs: + extends: .ssh-agent stage: publish - image: alpine needs: - job: build_docs artifacts: true - 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 - + rules: + - if: $CI_COMMIT_BRANCH == "stable" + + image: $CI_REGISTRY/funkwhale/ci/python:3.11 script: - rsync -r -e "ssh -p 2282" $CI_PROJECT_DIR/public/ docs@docs.funkwhale.audio:/htdocs/ - only: - - stable .docker_publish: stage: publish