Add tasks to set up SSH agent and publish installation
This commit is contained in:
		
							parent
							
								
									db4dfd0ba7
								
							
						
					
					
						commit
						daf8da61b1
					
				
					 1 changed files with 25 additions and 2 deletions
				
			
		
							
								
								
									
										27
									
								
								.github/workflows/staging.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/staging.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -1,10 +1,13 @@ | |||
| name: Deploy to Antville.org development environment | ||||
| name: Staging | ||||
| 
 | ||||
| on: | ||||
|   workflow_dispatch | ||||
| 
 | ||||
| env: | ||||
|   SSH_AUTH_SOCK: /tmp/ssh-agent.sock | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|   install: | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     environment: | ||||
|  | @ -25,3 +28,23 @@ jobs: | |||
| 
 | ||||
|     - name: Build with Gradle | ||||
|       run: ./gradlew installDist | ||||
| 
 | ||||
|     - name: Set up SSH agent | ||||
|       run: | | ||||
|         ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||||
|         ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||||
|         mkdir -p ~/.ssh | ||||
|         echo '${{ vars.SSH_CONFIG }}' > ~/.ssh/config | ||||
|         echo '${{ vars.KNOWN_HOSTS }}' > ~/.ssh/known_hosts | ||||
| 
 | ||||
|     - name: Publish to staging server | ||||
|       run: | | ||||
|         rsync build/install/helma/ antville.dev:/ \ | ||||
|           --verbose --archive --delete --compress \ | ||||
|           --filter '+ launcher.jar' \ | ||||
|           --filter '+ lib' \ | ||||
|           --filter '+ *.jar' \ | ||||
|           --filter '- *' \ | ||||
| 
 | ||||
|     - name: Restart Helma | ||||
|       run: ssh antville.dev restart | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue