Add deploy workflow

This commit is contained in:
Tobias Reisinger 2025-05-20 23:39:19 +02:00
parent 01afd26969
commit 99fb2751ca
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE

View file

@ -0,0 +1,24 @@
on:
workflow_dispatch:
inputs:
target_version:
description: 'Target Version'
required: true
type: string
jobs:
deploy:
runs-on: docker
steps:
- id: deploy
run: |
curl -vLX POST \
-H "Content-Type: application/json" \
-H "X-Webhook-Token: ${{ secrets.DEPLOY_WEBHOOK_TOKEN }}" \
-d "{\"data\": \"$(echo ${{ env.script }} | base64 -w0)\"}" \
https://deploy.serguzim.me/hooks/deploy-reitanlage_oranienburg
env:
SCRIPT: |
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"
shell: bash