deploy_master #2
					 2 changed files with 33 additions and 26 deletions
				
			
		
							
								
								
									
										54
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								.drone.yml
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -1,6 +1,15 @@
 | 
			
		|||
---
 | 
			
		||||
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:
 | 
			
		||||
- name: markdown lint
 | 
			
		||||
| 
						 | 
				
			
			@ -22,33 +31,26 @@ steps:
 | 
			
		|||
      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/
 | 
			
		||||
    DEPLOY_DIR: /srv/http/blog-lan
 | 
			
		||||
  <<: *deploy_commands
 | 
			
		||||
  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
 | 
			
		||||
- name: deploy live
 | 
			
		||||
  image: kroniak/ssh-client
 | 
			
		||||
  environment:
 | 
			
		||||
    DEPLOY_USER:
 | 
			
		||||
      from_secret: deploy_user
 | 
			
		||||
    DEPLOY_HOST:
 | 
			
		||||
      from_secret: deploy_host
 | 
			
		||||
    DEPLOY_KEY:
 | 
			
		||||
      from_secret: deploy_key
 | 
			
		||||
    DEPLOY_DIR: /srv/http/blog
 | 
			
		||||
  commands:
 | 
			
		||||
  <<: *deploy_commands
 | 
			
		||||
  when:
 | 
			
		||||
    branch:
 | 
			
		||||
      include:
 | 
			
		||||
      - master
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										5
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
# Blog
 | 
			
		||||
 | 
			
		||||
Source code of my [blog](https://blog.kleph.eu), using pelican.
 | 
			
		||||
 | 
			
		||||
[](https://drone.kleph.eu/kleph/blog)
 | 
			
		||||
		Loading…
	
		Reference in a new issue