File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
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 }}
You can’t perform that action at this time.
0 commit comments