Add deploy workflow
This commit is contained in:
		
							parent
							
								
									01afd26969
								
							
						
					
					
						commit
						f74f769d24
					
				
					 1 changed files with 25 additions and 0 deletions
				
			
		
							
								
								
									
										25
									
								
								.forgejo/workflows/deploy.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.forgejo/workflows/deploy.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | ||||||
|  | on: | ||||||
|  |   workflow_dispatch: | ||||||
|  |     inputs: | ||||||
|  |       target_version: | ||||||
|  |         description: 'Target Version' | ||||||
|  |         required: true | ||||||
|  |         type: string | ||||||
|  | jobs: | ||||||
|  |   deploy: | ||||||
|  |     runs-on: docker | ||||||
|  |     steps: | ||||||
|  |       - name: Prepare deploy script | ||||||
|  |         run: | | ||||||
|  |           cat <<EOF > script.sh | ||||||
|  |           cd /var/www/html | ||||||
|  |           bin/gpm direct-install -y \ | ||||||
|  |             "https://git.serguzim.me/serguzim/reitanlage-oranienburg/releases/download/${{ inputs.target_version }}/reitanlage-oranienburg-${{ inputs.target_version }}.zip" | ||||||
|  |       - id: deploy | ||||||
|  |         run: | | ||||||
|  |           curl -vLX POST \ | ||||||
|  |             -H "Content-Type: application/json" \ | ||||||
|  |             -H "X-Webhook-Token: ${{ secrets.DEPLOY_WEBHOOK_TOKEN }}" \ | ||||||
|  |             -d "{\"data\": \"$(base64 -w0 script.sh)\"}" \ | ||||||
|  |             https://deploy.serguzim.me/hooks/deploy-reitanlage_oranienburg | ||||||
|  |         shell: bash | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue