File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Keep Render Service Alive
2+
3+ on :
4+ workflow_dispatch : # run manually
5+ push :
6+ branches :
7+ - main # or whichever branch you deploy from
8+
9+ jobs :
10+ qstash-keepalive :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout repo
14+ uses : actions/checkout@v3
15+
16+ - name : Install curl
17+ run : sudo apt-get install -y curl
18+
19+ - name : Create/Update QStash schedule
20+ env :
21+ QSTASH_TOKEN : ${{ secrets.QSTASH_TOKEN }}
22+ run : |
23+ curl -X POST "https://qstash-us-east-1.upstash.io/v1/schedules" \
24+ -H "Authorization: Bearer $QSTASH_TOKEN" \
25+ -H "Content-Type: application/json" \
26+ -d '{
27+ "cron": "*/14 * * * *",
28+ "destination": "https://eltes.onrender.com/health",
29+ "method": "GET"
30+ }'
Original file line number Diff line number Diff line change 1+ // app/api/health/route.ts
2+ import { NextResponse } from "next/server" ;
3+
4+ export async function GET ( ) {
5+ return NextResponse . json ( { status : "OK" } , { status : 200 } ) ;
6+ }
You can’t perform that action at this time.
0 commit comments