-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #5 Also renamed the health check workflow file to be `health-check`. ## Summary - **New Features** - Increased the frequency of health check workflows from every six hours to every two hours for improved monitoring. - Introduced a clearer execution step for health checks. - **Documentation** - Overhauled the `README.md` file to provide specific instructions for deploying and managing a GitHub Status Page application, including usage, deployment setup, and incident reporting.
- Loading branch information
Showing
4 changed files
with
64 additions
and
24 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,77 @@ | ||
# create-svelte | ||
# GitHub Status Page | ||
|
||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). | ||
GitHub Status Page is the open-source status page, powered entirely by GitHub Actions, Issues, and Pages. | ||
|
||
## Creating a project | ||
![screenshot](.github/screenshot.png) | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
# Usage | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
First of all, you need to fork this repository. | ||
|
||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
## Update URL's | ||
|
||
Update the URLs in `.github/workflows/health-check.yml`. | ||
|
||
You need to search for a job named `Fetch Metrics` and modify the `SOURCES` field. | ||
|
||
```yml | ||
- name: Health Check | ||
run: npm start | ||
id: metrics | ||
env: | ||
SOURCES: | | ||
GitHub->https://github.com | ||
Facebook->https://facebook.com | ||
``` | ||
## Developing | ||
The format to follow is: `SiteName->SiteUrl`. Use the `->` as the delimiter between the name you want to display and the URL. | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
You can also set this up as a [`repository secret`](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) if you want to keep the health url private. | ||
|
||
```bash | ||
npm run dev | ||
## Deployment setup | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
Then, you need to enable GitHub Pages on your forked repository. You can do this by going to `Settings > Pages` and enabling it on the `main` branch. | ||
|
||
In Build and deployment section select GitHub Actions. | ||
|
||
## Enable actions | ||
|
||
Go to the `Actions` tab and enable workflows to run. | ||
|
||
## Building | ||
## Change monitoring interval | ||
|
||
To create a production version of your app: | ||
If you want to change the time interval of monitoring then you can change it in `.github/workflows/health-check.yml` file. Update the cron time in the following line. | ||
|
||
```bash | ||
npm run build | ||
```yaml | ||
schedule: | ||
- cron: '0 0/12 * * *' | ||
``` | ||
|
||
You can preview the production build with `npm run preview`. | ||
## Reporting your first incident | ||
|
||
1. Go to issues tab | ||
2. Create a new label named `incident` | ||
3. Create a issue | ||
4. Add the label `incident` to the issue | ||
|
||
# How it works | ||
|
||
- Hosting | ||
- GitHub Pages is used for hosting the status page. | ||
- Monitoring | ||
- Github Workflow will be triggered every 2 Hr (Configurable) to visit the website. | ||
- Response status is compiled and the site is rebuild with the new information. | ||
- Incidents | ||
- Github issue is used for incident management. | ||
|
||
# Credits | ||
|
||
<a target="_blank" href="https://icons8.com/icon/14835/heart-monitor">Heartbeat</a> favicon by <a target="_blank" href="https://icons8.com">Icons8</a> | ||
|
||
Project is mainly inspired by [mehatab/fettle](https://github.com/mehatab/fettle). | ||
Main difference between this project and fettle are: | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. | ||
- This project was built in SvelteKit. | ||
- It doesn't commit the status log, instead it is stored as an artifact. | ||
- You can set up your health urls as a secret by using [`repository secrets`](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions). | ||
- You can host it in any GitHub pages. You [don't need a custom url](https://github.com/mehatab/fettle/issues/20). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.