From b1ba25bd5f75716ec6145e15e940370da59ae508 Mon Sep 17 00:00:00 2001 From: Zero-Sugar0 Date: Wed, 29 Apr 2026 21:30:03 +0100 Subject: [PATCH 1/3] Add GitHub Actions workflow to keep service alive --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ef38cd3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: Keep Render Service Alive + +on: + workflow_dispatch: # run manually + push: + branches: + - main # or whichever branch you deploy from + +jobs: + qstash-keepalive: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Install curl + run: sudo apt-get install -y curl + + - name: Create/Update QStash schedule + env: + QSTASH_TOKEN: ${{ secrets.QSTASH_TOKEN }} + run: | + curl -X POST "https://qstash-us-east-1.upstash.io/v1/schedules" \ + -H "Authorization: Bearer $QSTASH_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "cron": "*/14 * * * *", + "destination": "https://eltes.onrender.com/health", + "method": "GET" + }' From e154427f346da6f1adf6baefa7e187561441df4c Mon Sep 17 00:00:00 2001 From: Zero-Sugar0 Date: Wed, 29 Apr 2026 21:33:38 +0100 Subject: [PATCH 2/3] Add health check route for API --- app/api/health/route.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 app/api/health/route.ts diff --git a/app/api/health/route.ts b/app/api/health/route.ts new file mode 100644 index 0000000..180e1d4 --- /dev/null +++ b/app/api/health/route.ts @@ -0,0 +1,6 @@ +// app/api/health/route.ts +import { NextResponse } from "next/server"; + +export async function GET() { + return NextResponse.json({ status: "OK" }, { status: 200 }); +} From 86aef7dc9fb49913147010605925a368f4175596 Mon Sep 17 00:00:00 2001 From: Zero-Sugar0 Date: Thu, 30 Apr 2026 11:50:54 +0100 Subject: [PATCH 3/3] Delete .github/workflows/main.yml --- .github/workflows/main.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index ef38cd3..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Keep Render Service Alive - -on: - workflow_dispatch: # run manually - push: - branches: - - main # or whichever branch you deploy from - -jobs: - qstash-keepalive: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Install curl - run: sudo apt-get install -y curl - - - name: Create/Update QStash schedule - env: - QSTASH_TOKEN: ${{ secrets.QSTASH_TOKEN }} - run: | - curl -X POST "https://qstash-us-east-1.upstash.io/v1/schedules" \ - -H "Authorization: Bearer $QSTASH_TOKEN" \ - -H "Content-Type: application/json" \ - -d '{ - "cron": "*/14 * * * *", - "destination": "https://eltes.onrender.com/health", - "method": "GET" - }'