Server Health Check #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Server Health Check | |
on: | |
schedule: | |
- cron: "0 16 * * *" | |
jobs: | |
health_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Server Status | |
run: | | |
curl -sSf -X POST -H "Content-Type: application/json" --data '{ | |
"prompt": "You are a helpful assistant.", | |
"content": "How are you?" | |
}' ${{ secrets.SERVER_URL }} | |
if [[ $? -eq 0 ]]; then | |
echo "Server is active" | |
else | |
echo "Server is down" | |
exit 1 | |
fi |