@@ -12,12 +12,18 @@ source "$(dirname "$0")/lib.sh"
libcamera_deploy_docs() {
echo "Deploying libcamera docs for ${CI_COMMIT_REF_NAME}"
+ mkdir -p ~/.ssh
+ chmod 700 ~/.ssh
+ echo "${DEPLOY_KNOWN_HOSTS}" > ~/.ssh/known_hosts
+ eval $(ssh-agent -s)
+ echo "${DEPLOY_SSH_KEY_BASE64}" | base64 -d | ssh-add -
+
rsync -rlz --delete --chmod=Do=rx,Fo=r \
- --exclude .doctrees \
- --exclude .buildinfo \
- --exclude objects.inv \
- docs/ \
- "${DEPLOY_DESTINATION}/${CI_COMMIT_REF_NAME}"
+ --exclude .doctrees \
+ --exclude .buildinfo \
+ --exclude objects.inv \
+ docs/ \
+ "${DEPLOY_DESTINATION}/${CI_COMMIT_REF_NAME}"
}
run libcamera_deploy_docs
@@ -461,11 +461,4 @@ deploy-docs:
needs:
- job: build-docs
script:
- - |
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "${DEPLOY_KNOWN_HOSTS}" > ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- echo "${DEPLOY_SSH_KEY_BASE64}" | base64 -d | ssh-add -
-
- $CI_PROJECT_DIR/.gitlab-ci/deploy-libcamera-docs.sh
Job definitions in .gitlab-ci.yml are stored by Gitlab in jobs. This means that a new full pipeline needs to be run when making a change to the job, as re-running a failed job will not pick up changes to the job definition. To avoid this and help with development, move the ssh configuration script to the deploy-libcamera-docs.sh file. As the libcamera-ci repository is cloned freshly every time a job is run, changes to the script can be tested just by re-running the job. While at it, fix indentation in the rsync command. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- .gitlab-ci/deploy-libcamera-docs.sh | 16 +++++++++++----- gitlab-ci.yml | 7 ------- 2 files changed, 11 insertions(+), 12 deletions(-)