Add deploy workflow
This commit is contained in:
		
							parent
							
								
									01afd26969
								
							
						
					
					
						commit
						18cc04f5df
					
				
					 3 changed files with 21 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -27,3 +27,22 @@ jobs:
 | 
			
		|||
          direction: upload
 | 
			
		||||
          release-dir: /tmp/release-dir
 | 
			
		||||
          token: ${{ github.token }}
 | 
			
		||||
 | 
			
		||||
  deploy:
 | 
			
		||||
    runs-on: docker
 | 
			
		||||
    needs: build-artifacts
 | 
			
		||||
    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/${{ github.ref_name }}/reitanlage-oranienburg-${{ github.ref_name }}.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