Skip to content

Commit 9e3f0c9

Browse files
committed
Trying to fix label in readme
1 parent 14494e4 commit 9e3f0c9

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Website Status Check
2+
3+
on:
4+
schedule:
5+
- cron: '*/30 * * * *' # Runs every 30 minutes
6+
workflow_dispatch: # Allows manual triggering
7+
8+
jobs:
9+
check_website:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check website status
13+
uses: upptime/uptime-monitor@v1
14+
with:
15+
urls: https://django-appt-doc.adamspierredavid.com
16+
assignees: adamspd # Replace with your GitHub username
17+
18+
- name: Generate badge
19+
run: |
20+
if [ ${{ job.status }} == 'success' ]; then
21+
echo "STATUS=up" >> $GITHUB_ENV
22+
echo "COLOR=brightgreen" >> $GITHUB_ENV
23+
else
24+
echo "STATUS=down" >> $GITHUB_ENV
25+
echo "COLOR=red" >> $GITHUB_ENV
26+
fi
27+
28+
- name: Create status badge
29+
uses: schneegans/[email protected]
30+
with:
31+
auth: ${{ secrets.GIST_SECRET }}
32+
gistID: d52b1c6c561ebbf94ddc2a8b52561908 # You'll need to create a gist and put its ID here
33+
filename: django-appointment-doc-status.json
34+
label: django-appointment docs
35+
message: ${{ env.STATUS }}
36+
color: ${{ env.COLOR }}

0 commit comments

Comments
 (0)