Merge pull request 'deploy_master' (#2) from deploy_master into master
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #2
This commit is contained in:
kleph 2020-10-27 18:57:04 +01:00
commit e418312a25
2 changed files with 33 additions and 26 deletions

View file

@ -1,6 +1,15 @@
--- ---
kind: pipeline kind: pipeline
name: lint 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: steps:
- name: markdown lint - name: markdown lint
@ -22,33 +31,26 @@ steps:
from_secret: deploy_host from_secret: deploy_host
DEPLOY_KEY: DEPLOY_KEY:
from_secret: deploy_key from_secret: deploy_key
commands: DEPLOY_DIR: /srv/http/blog-lan
- echo "deploy $DEPLOY_USER@$DEPLOY_HOST" <<: *deploy_commands
- 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: when:
branch: branch:
exclude: exclude:
- master - master
#- name: deploy staging - name: deploy live
# image: kroniak/ssh-client image: kroniak/ssh-client
# environment: environment:
# DEPLOY_USER: DEPLOY_USER:
# from_secret: deploy_user from_secret: deploy_user
# DEPLOY_HOST: DEPLOY_HOST:
# from_secret: deploy_host from_secret: deploy_host
# DEPLOY_KEY: DEPLOY_KEY:
# from_secret: deploy_key from_secret: deploy_key
# commands: DEPLOY_DIR: /srv/http/blog
# - echo "deploy $DEPLOY_USER@$DEPLOY_HOST" commands:
# - echo "$DEPLOY_KEY" | sed 's/!/\n/g' > deploy_key <<: *deploy_commands
# - chmod 0600 deploy_key when:
# - cat deploy_key branch:
# - scp -i deploy_key -o StrictHostKeyChecking=no output/* $DEPLOY_USER@$DEPLOY_HOST:/srv/http/blog/output/ include:
# when: - master
# branch:
# include:
# - master

5
README.md Normal file
View file

@ -0,0 +1,5 @@
# Blog
Source code of my [blog](https://blog.kleph.eu), using pelican.
[![Build Status](https://drone.kleph.eu/api/badges/kleph/blog/status.svg)](https://drone.kleph.eu/kleph/blog)