deployment
This commit is contained in:
28
.gitea/workflows/deploy.yml
Normal file
28
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Deploy-Test-API
|
||||
run-name: ${{ gitea.actor }} is deploying the test API 🚀
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
target_env:
|
||||
description: 'Environnement de destination'
|
||||
required: true
|
||||
default: 'production'
|
||||
|
||||
jobs:
|
||||
Deploy-To-VM:
|
||||
# On demande à notre Runner Ubuntu de s'en occuper
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Vérification du statut
|
||||
run: echo "Déploiement initié par ${{ gitea.actor }}."
|
||||
|
||||
# On utilise directement la commande Docker de la VM hôte pour reconstruire et relancer
|
||||
- name: Rebuild & Restart Test API
|
||||
run: |
|
||||
cd /home/ubuntu/n8n-stack
|
||||
docker compose build test-api
|
||||
docker compose up -d --no-deps test-api
|
||||
|
||||
- name: Succès
|
||||
run: echo "API redéployée avec succès !"
|
||||
Reference in New Issue
Block a user