CI: Add docs deployment job (MR 2316)

Tweaked-By: Oliver Smith <ollieparanoid@postmarketos.org>
This commit is contained in:
Luca Weiss 2024-05-22 18:53:42 +02:00 committed by Oliver Smith
parent e9faee3747
commit 048f24cf50
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -17,6 +17,7 @@ before_script: &global_before_scripts
stages:
- lint
- deploy
- test
codespell:
@ -72,3 +73,18 @@ docs:
artifacts:
paths:
- public
deploy:
only:
- master
stage: deploy
before_script:
- apk -q add openssh-client rsync
script:
- mkdir "${HOME}/.ssh"
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_ed25519"
- chmod 700 "${HOME}/.ssh/id_ed25519"
- rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" public/ "${SSH_HOST}":/var/www/docs.postmarketos.org/pmbootstrap/
environment:
name: deploy