Update deploy
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
continuous-integration/drone Build is failing

This commit is contained in:
Dominic Grimm 2022-02-19 08:18:57 +01:00
parent df3bcfca79
commit 1380a6b805

View file

@ -145,30 +145,42 @@ steps:
mount:
- ./docs/book
- ./docker/backend/docs
- name: deploy
image: ringcentral/sshpass
environment:
SSHHOST:
from_secret: docs_deploy_ssh_host
SSHPASS:
from_secret: docs_deploy_ssh_password
- name: prepare-docs
image: alpine
volumes:
- name: cache
path: /cache
- name: docs
path: /tmp/docs
commands:
- mkdir /tmp/docs
- cp -r ./docs/book/* /tmp/docs
- mkdir -p /tmp/docs/_api/backend
- cp -r ./docker/backend/docs/* /tmp/docs/_api/backend
# - sshpass -e ssh $SSHUSER@$SSHHOST rm -rf /mnt/web/docs
# - sshpass -e ssh $SSHUSER@$SSHHOST mkdir -p /mnt/web/docs
# - sshpass -e scp -r /tmp/sdocs/* $SSHHOST:/mnt/web/docs
- echo $SSHPASS | sshpass ssh -n $SSHHOST
- name: deploy-docs
image: appleboy/drone-scp
volumes:
- name: docs
path: /tmp/docs
settings:
host:
from_secret: docs_deploy_ssh_host
user:
from_secret: docs_deploy_ssh_user
password:
from_secret: docs_deploy_ssh_password
target: /mnt/web/docs
source: /tmp/docs
rm: true
depends_on:
- restore-cache
- prepare-docs
volumes:
- name: cache
host:
path: /tmp/cache
- name: docs
temp: {}
depends_on:
- default