Aggiunta l'action

Signed-off-by: Francesco Mancuso <hello@francescomancuso.it>
This commit is contained in:
2026-01-25 19:26:00 +01:00
parent 3c16dfde40
commit 03fce2b6a3

View File

@@ -0,0 +1,30 @@
name: Deploy
#on: [push] # Decommenta questa riga per attivare il deploy
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Build & Deploy
env:
REPO_NAME: ${{ gitea.event.repository.name }}
REPO_OWNER: ${{ gitea.repository_owner }}
# Imposta la cartella che conterrà la root del sito!
# Default "/"
# Con nome "nome_cartella"
ROOT_DIR: "/"
# Cosa stai andando a pubblicare?
# - pages sito web statico
# - dynamic sito web dinamico con PHP
TYPE: "pages"
JOB_TOKEN: ${{ gitea.token }}
run: |
curl -f -s -S -X -v POST http://gitea-webhook:9000/hooks/trigger-deploy \
-H "Content-Type: application/json" \
-d "{
\"repository\": { \"name\": \"$REPO_NAME\" },
\"owner\": { \"username\": \"$REPO_OWNER\" },
\"root\": \"$ROOT_DIR\",
\"type\": \"$TYPE\",
\"token\": \"$JOB_TOKEN\"
}"