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: