Skip to content

Commit

Permalink
add actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyansh1410 committed Oct 6, 2024
1 parent b2eaa6d commit 8d83e78
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/keep-server-active.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Keep MERN Server Active

on:
schedule:
- cron: "*/10 * * * *" # Runs every 10 minutes

jobs:
ping_api:
runs-on: ubuntu-latest
steps:
- name: Send GET request to MERN Server
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" ${{ secrets.RENDER_SERVER_API_URL }}/ping)
if [ $response -eq 200 ]; then
echo "Ping successful"
else
echo "Ping failed with status code $response"
exit 1
fi
env:
RENDER_SERVER_API_URL: ${{ secrets.RENDER_SERVER_API_URL }}

0 comments on commit 8d83e78

Please sign in to comment.