Check Website returns 200 OK #1
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: Check Website returns 200 OK | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- Update website on server | |
types: | |
- completed | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for 5 minutes | |
run: sleep 300 | |
- name: Check HTTP Status Code | |
run: | | |
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://gbfs.org) | |
if [ "$STATUS_CODE" -ne 200 ]; then | |
echo "Error: Website returned status code $STATUS_CODE" | |
exit 1 | |
fi | |
echo "Website is up and returned 200" |