From f5252a2a10b4c4c00165c37788ff184ecf1288aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20P=C3=A9rez=20Arcas?= Date: Sun, 3 May 2026 15:45:35 +0000 Subject: [PATCH] Subir archivos a "finalexam" --- finalexam/deploy-cloud.sh | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 finalexam/deploy-cloud.sh diff --git a/finalexam/deploy-cloud.sh b/finalexam/deploy-cloud.sh new file mode 100644 index 0000000..84ba71f --- /dev/null +++ b/finalexam/deploy-cloud.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +set -e + +echo "========================================" +echo " Student Study Planner - Cloud deploy" +echo "========================================" + +echo "" +echo "This script triggers a public deployment on Render." +echo "It requires Render deploy hook URLs as environment variables." +echo "" + +if ! command -v curl >/dev/null 2>&1; then + echo "ERROR: curl is not installed." + exit 1 +fi + +if [ -z "$RENDER_BACKEND_DEPLOY_HOOK" ]; then + echo "ERROR: RENDER_BACKEND_DEPLOY_HOOK is not set." + echo "" + echo "Set it with:" + echo "export RENDER_BACKEND_DEPLOY_HOOK='https://api.render.com/deploy/....'" + exit 1 +fi + +if [ -z "$RENDER_FRONTEND_DEPLOY_HOOK" ]; then + echo "ERROR: RENDER_FRONTEND_DEPLOY_HOOK is not set." + echo "" + echo "Set it with:" + echo "export RENDER_FRONTEND_DEPLOY_HOOK='https://api.render.com/deploy/....'" + exit 1 +fi + +echo "Triggering backend deploy..." +curl -fsS -X POST "$RENDER_BACKEND_DEPLOY_HOOK" + +echo "" +echo "Triggering frontend deploy..." +curl -fsS -X POST "$RENDER_FRONTEND_DEPLOY_HOOK" + +echo "" +echo "========================================" +echo "Deploy triggered successfully." +echo "========================================" +echo "" +echo "Public frontend:" +echo "https://tasknotes-frontend.onrender.com" +echo "" +echo "Backend health endpoint:" +echo "https://tasknotes-backend.onrender.com/health" +echo "" +echo "Note: Render free instances may take some seconds to wake up." +echo "========================================"