From d3a4cc5b71dd15372fb42d69432197938d544744 Mon Sep 17 00:00:00 2001 From: filippoxausa Date: Tue, 11 Feb 2025 16:18:01 +0100 Subject: [PATCH] Added SUPER_SECRET --- .github/workflows/deploy.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 21f6ced..de5e10d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,42 +19,39 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 # Cambia la versione se necessario + node-version: 18 - # Installazione dipendenze backend - name: Install backend dependencies run: | cd backend npm install - # Esegui i test - name: Run backend tests + env: + SUPER_SECRET: ${{ secrets.SUPER_SECRET }} run: | cd backend npm test - # Se i test passano, installiamo dipendenze frontend - name: Install frontend dependencies run: | cd frontend npm install - # Build del frontend - name: Build frontend run: | cd frontend npm run build - # Deploy frontend su Render - name: Deploy frontend to Render - if: success() # Esegue il deploy solo se i test passano + if: success() run: curl -X POST "$RENDER_DEPLOY_HOOK_FRONTEND" env: RENDER_DEPLOY_HOOK_FRONTEND: ${{ secrets.RENDER_DEPLOY_HOOK_FRONTEND }} - # Deploy backend su Render - name: Deploy backend to Render - if: success() # Esegue il deploy solo se i test passano + if: success() run: curl -X POST "$RENDER_DEPLOY_HOOK_BACKEND" env: RENDER_DEPLOY_HOOK_BACKEND: ${{ secrets.RENDER_DEPLOY_HOOK_BACKEND }} +