Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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"
}'
6 changes: 6 additions & 0 deletions app/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -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 });
}
Loading