Add deploy workflow
All checks were successful
/ build-artifacts (push) Successful in 1m4s
/ deploy (push) Successful in 2s

This commit is contained in:
Tobias Reisinger 2025-05-20 23:54:41 +02:00
parent 01afd26969
commit 18cc04f5df
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 21 additions and 2 deletions

View file

@ -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