diff --git a/.github/workflows/develop_mastercheft2.yml b/.github/workflows/develop_mastercheft2.yml index a837277..5a01ce9 100644 --- a/.github/workflows/develop_mastercheft2.yml +++ b/.github/workflows/develop_mastercheft2.yml @@ -39,23 +39,30 @@ jobs: name: masterchef-api path: target/*.jar - deploy: - runs-on: ubuntu-latest - needs: build-and-test - if: github.ref == 'refs/heads/main' # Solo se ejecuta en push a main - permissions: - id-token: write - contents: read +deploy: + runs-on: ubuntu-latest + needs: build + permissions: + id-token: write + contents: read - steps: - - name: 📥 Descargar artefacto generado - uses: actions/download-artifact@v4 - with: - name: masterchef-api + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: java-app + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E3BBA8DC2C9849D1B0EFC1E10CE96DD0 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_A24240666636424A8BBF6C81D16FE73E }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7C9E359957B94BC8950CA740807D8487 }} - - name: 🚀 Desplegar en Azure Web App - uses: azure/webapps-deploy@v2 - with: - app-name: 'masterchefT2' - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: '*.jar' + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v3 + with: + app-name: 'theboys-sirha' + slot-name: 'Production' + package: '*.jar'