Skip to content

Commit 7567179

Browse files
authored
Merge pull request #242 from adamspd/fix-doc-badge
Fix documention badge
2 parents 14494e4 + a382db1 commit 7567179

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
label: django-appointment docs
34+
message: ${{ env.STATUS }}
35+
color: ${{ env.COLOR }}
36+
isError: ${{ job.status == 'failure' }}
37+
namedLogo: django

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Tests](https://github.com/adamspd/django-appointment/actions/workflows/tests.yml/badge.svg)
44
![Published on PyPi](https://github.com/adamspd/django-appointment/actions/workflows/publish.yml/badge.svg)
5-
[![Doc](https://github.com/adamspd/django-appointment-doc/actions/workflows/build-docs.yml/badge.svg)](https://django-appt-doc.adamspierredavid.com)
5+
[![Doc](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/adamspd/d52b1c6c561ebbf94ddc2a8b52561908/raw/django-appointment-doc-status.json)](https://django-appt-doc.adamspierredavid.com)
66
[![Current Release Version](https://img.shields.io/github/release/adamspd/django-appointment.svg?style=flat-square&logo=github)](https://github.com/adamspd/django-appointment/releases)
77
[![pypi Version](https://img.shields.io/pypi/v/django-appointment.svg?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/django-appointment/)
88
[![PyPi downloads](https://static.pepy.tech/personalized-badge/django-appointment?period=total&units=international_system&left_color=grey&right_color=orange&left_text=pip%20downloads)](https://pypi.org/project/django-appointment/)

0 commit comments

Comments
 (0)