Sandbox update fix
This commit is contained in:
		
							parent
							
								
									3fb5c217e4
								
							
						
					
					
						commit
						0a6789c56c
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		
							
								
								
									
										12
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								.drone.yml
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -36,18 +36,19 @@ steps:
 | 
			
		|||
  commands:
 | 
			
		||||
  - go mod tidy
 | 
			
		||||
  - make build
 | 
			
		||||
 | 
			
		||||
- name: deploy
 | 
			
		||||
  image: debian:buster
 | 
			
		||||
  environment:
 | 
			
		||||
    NODE: node-x.rosti.cz
 | 
			
		||||
    SSH_KEY:
 | 
			
		||||
      from_secret: ssh_key
 | 
			
		||||
      from_secret: SSH_KEY
 | 
			
		||||
  commands:
 | 
			
		||||
  - apt update && apt install -y ssh
 | 
			
		||||
  - mkdir ~/.ssh && echo $SSH_KEY > ~/.ssh/id_key && chmod 600 ~/.ssh/id_key
 | 
			
		||||
  - scp node-api root@$NODES:/usr/local/bin/node-api_
 | 
			
		||||
  - ssh root@$NODES mv /usr/local/bin/node-api_ /usr/local/bin/node-api
 | 
			
		||||
  - ssh root@$NODES systemctl restart node-api
 | 
			
		||||
  - scp node-api root@$NODE:/usr/local/bin/node-api_
 | 
			
		||||
  - ssh root@$NODE mv /usr/local/bin/node-api_ /usr/local/bin/node-api
 | 
			
		||||
  - ssh root@$NODE systemctl restart node-api
 | 
			
		||||
 | 
			
		||||
trigger:
 | 
			
		||||
  branch:
 | 
			
		||||
| 
						 | 
				
			
			@ -55,3 +56,6 @@ trigger:
 | 
			
		|||
  event:
 | 
			
		||||
  - push
 | 
			
		||||
  - custom
 | 
			
		||||
 | 
			
		||||
depends_on:
 | 
			
		||||
  - test
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue