From dccc03d3de0f31f89bcf743e608fba62005ddb26 Mon Sep 17 00:00:00 2001 From: kleph Date: Tue, 27 Oct 2020 17:53:28 +0100 Subject: [PATCH] [CI] Fix yaml --- .drone.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index 25b3646..c778cf6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,15 @@ --- kind: pipeline -name: build +name: build and deploy + +deploy_commands_alias: +- &deploy_commands + commands: + - echo "deploy $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR or $${DEPLOY_DIR}" + - echo "$DEPLOY_KEY" | sed 's/!/\n/g' > deploy_key + - chmod 0600 deploy_key + - ssh -i deploy_key -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_HOST rm -Rf $${DEPLOY_DIR}/output/ + - scp -r -i deploy_key -o StrictHostKeyChecking=no output $DEPLOY_USER@$DEPLOY_HOST:$${DEPLOY_DIR} steps: - name: markdown lint @@ -13,19 +22,6 @@ steps: commands: - pelican content -o output -s pelicanconf.py - ---- -deploy_commands: -- &deploy_commands - commands: - - echo "deploy $DEPLOY_USER@$DEPLOY_HOST" - - echo "$DEPLOY_KEY" | sed 's/!/\n/g' > deploy_key - - chmod 0600 deploy_key - - ssh -i deploy_key -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_HOST rm -Rf ${DEPLOY_DIR}/output/ - - scp -r -i deploy_key -o StrictHostKeyChecking=no output $DEPLOY_USER@$DEPLOY_HOST:${DEPLOY_DIR} - -kind: pipeline -name: deploy - name: deploy staging image: kroniak/ssh-client environment: