blog/.drone.yml
kleph 7728c2a005
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
[CI] Remove debug and fix deploy command
2020-10-27 17:24:25 +01:00

54 lines
1.4 KiB
YAML

---
kind: pipeline
name: lint
steps:
- name: markdown lint
image: pipelinecomponents/markdownlint:latest
commands:
- mdl .
- name: build pelican
image: apihackers/pelican
commands:
- pelican content -o output -s pelicanconf.py
- name: deploy staging
image: kroniak/ssh-client
environment:
DEPLOY_USER:
from_secret: deploy_user
DEPLOY_HOST:
from_secret: deploy_host
DEPLOY_KEY:
from_secret: deploy_key
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 /srv/http/blog-lan/output/
- scp -r -i deploy_key -o StrictHostKeyChecking=no output $DEPLOY_USER@$DEPLOY_HOST:/srv/http/blog-lan/
when:
branch:
exclude:
- master
#- name: deploy staging
# image: kroniak/ssh-client
# environment:
# DEPLOY_USER:
# from_secret: deploy_user
# DEPLOY_HOST:
# from_secret: deploy_host
# DEPLOY_KEY:
# from_secret: deploy_key
# commands:
# - echo "deploy $DEPLOY_USER@$DEPLOY_HOST"
# - echo "$DEPLOY_KEY" | sed 's/!/\n/g' > deploy_key
# - chmod 0600 deploy_key
# - cat deploy_key
# - scp -i deploy_key -o StrictHostKeyChecking=no output/* $DEPLOY_USER@$DEPLOY_HOST:/srv/http/blog/output/
# when:
# branch:
# include:
# - master