mirror of
https://github.com/tormachris/cf-workers-status-page.git
synced 2024-11-23 14:45:41 +01:00
feat(cicd): deploy from github actions
This commit is contained in:
parent
541bdace4b
commit
b190861157
20
.github/workflows/deploy.yml
vendored
20
.github/workflows/deploy.yml
vendored
@ -1,6 +1,11 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
- repository_dispatch
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
@ -13,9 +18,18 @@ jobs:
|
||||
- run: yarn install
|
||||
- run: yarn build
|
||||
- name: Publish
|
||||
uses: cloudflare/wrangler-action@1.2.0
|
||||
uses: cloudflare/wrangler-action@1.3.0
|
||||
with:
|
||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||
preCommands: |
|
||||
wrangler kv:namespace create KV_STATUS_PAGE
|
||||
apt-get update && apt-get install -y jq
|
||||
kv_namespace_id=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("KV_STATUS_PAGE")))' | jq ".[0].id")
|
||||
echo "[env.production]" >> wrangler.toml
|
||||
echo "kv_namespaces = [{binding=\"KV_STATUS_PAGE\", id=${kv_namespace_id}}]" >> wrangler.toml
|
||||
secrets: |
|
||||
SECRET_SLACK_WEBHOOK_URL
|
||||
environment: production
|
||||
env:
|
||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
IS_WORKER: true
|
||||
SECRET_SLACK_WEBHOOK_URL: ${{secrets.SECRET_SLACK_WEBHOOK_URL}}
|
||||
|
327
config.yaml
327
config.yaml
@ -1,334 +1,37 @@
|
||||
settings:
|
||||
title: "Status Page"
|
||||
url: "https://status-page.eidam.dev" # for Slack messages
|
||||
url: "https://status-page.eidam.dev" # used for Slack messages
|
||||
logo: logo-192x192.png # image in ./public/ folder
|
||||
daysInHistogram: 90
|
||||
daysInHistogram: 90 # number of days you want to display in histogram
|
||||
|
||||
allmonitorsOperational: "All Systems Operational"
|
||||
notAllmonitorsOperational: "Not All Systems Operational"
|
||||
monitorLabelOperational: "Operational"
|
||||
monitorLabelNotOperational: "Not great not terrible"
|
||||
monitorLabelNotOperational: "Not Operational"
|
||||
monitorLabelNoData: "No data"
|
||||
dayInHistogramNoData: "No data"
|
||||
dayInHistogramOperational: "All good"
|
||||
dayInHistogramNotOperational: "Some checks failed"
|
||||
|
||||
monitors:
|
||||
- id: kiwi-com-homepage
|
||||
name: Kiwi.com homepage
|
||||
description: Kiwi.com en homepage
|
||||
url: 'https://www.kiwi.com/en/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
followRedirect: false
|
||||
|
||||
- id: eidam-dev
|
||||
name: Cheesy Status Page
|
||||
description: 'status-page.eidam.dev'
|
||||
url: 'https://status-page.eidam.dev/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: google-com
|
||||
name: Google.com
|
||||
description: Google homepage
|
||||
url: 'https://www.google.com'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
- id: status-page-eidam-dev # unique identifier
|
||||
name: Eidam's Status Page
|
||||
description: 'https://status-page.eidam.dev' # default=empty
|
||||
url: 'https://status-page.eidam.dev/' # URL to fetch
|
||||
method: GET # default=GET
|
||||
expectStatus: 200 # operational status, default=200
|
||||
followRedirect: false # should fetch follow redirects, default=false
|
||||
|
||||
- id: cf-workers-status-page
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
name: Github.com Cloudflare Workers Status Page
|
||||
description: Is the Github repository public?
|
||||
url: 'https://github.com/eidam/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: kiwicomapi-cn
|
||||
name: Some other site
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: testy-testy
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: hello-world
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- id: eidam-dev-2
|
||||
name: Eidam.dev
|
||||
- id: eidam-dev
|
||||
name: Eidam.dev (403)
|
||||
description: 'Eidam.dev homepage, there is none'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
- id: cf-workers-status-page-2
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: kiwicomapi-cn-2
|
||||
name: Kiwi.com API CN
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: testy-testy-2
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: hello-world-2
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
||||
|
||||
- id: eidam-dev-22
|
||||
name: Eidam.dev
|
||||
description: 'Eidam.dev homepage, there is none'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
- id: cf-workers-status-page-22
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: kiwicomapi-cn-22
|
||||
name: Kiwi.com API CN
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: testy-testy-22
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: hello-world-22
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 201
|
||||
|
||||
|
||||
- id: eidam-dev-333
|
||||
name: Eidam.dev
|
||||
description: 'Eidam.dev homepage, there is none'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
- id: cf-workers-status-page-333
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: kiwicomapi-cn-333
|
||||
name: Kiwi.com API CN
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: testy-testy-333
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: hello-world-333
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- id: 25-eidam-dev
|
||||
name: Eidam.dev
|
||||
description: 'Eidam.dev homepage, there is none'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
- id: 25-cf-workers-status-page
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-kiwicomapi-cn
|
||||
name: Kiwi.com API CN
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-testy-testy
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-hello-world
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- id: 25-eidam-dev-2
|
||||
name: Seznam.cz
|
||||
description: 'Just seznam'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
|
||||
- id: 25-cf-workers-status-page-2
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-kiwicomapi-cn-2
|
||||
name: Kiwi.com API CN
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-testy-testy-2
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-hello-world-2
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
||||
|
||||
- id: 25-eidam-dev-22
|
||||
name: Eidam.dev
|
||||
description: 'Eidam.dev homepage, there is none'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
- id: 25-cf-workers-status-page-22
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-kiwicomapi-cn-22
|
||||
name: Something totally different
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-testy-testy-22
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-hello-world-22
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
||||
- id: 25-eidam-dev-333
|
||||
name: Eidam.dev
|
||||
description: 'Eidam.dev homepage, there is none'
|
||||
url: 'https://eidam.dev'
|
||||
method: GET
|
||||
expectStatus: 403
|
||||
|
||||
|
||||
- id: 25-cf-workers-status-page-333
|
||||
name: This Workers Status Page project made public
|
||||
description: /shrug
|
||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-kiwicomapi-cn-333
|
||||
name: Kiwi.com API CN
|
||||
description: Is this done yet?
|
||||
url: 'http://kiwicomapi.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-testy-testy-333
|
||||
name: Testy testy
|
||||
description: Something /shrug
|
||||
url: 'http://kiwicomapiiii.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-hello-world-333
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
- id: 25-hello-world-333
|
||||
name: Hello World
|
||||
url: 'http://cnn.cn/'
|
||||
method: GET
|
||||
expectStatus: 200
|
||||
|
||||
|
8595
package-lock.json
generated
Normal file
8595
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,23 +1,18 @@
|
||||
name = "cf-workers-status-page"
|
||||
type = "webpack"
|
||||
account_id = ""
|
||||
workers_dev = true
|
||||
route = ""
|
||||
zone_id = ""
|
||||
account_id = ""
|
||||
type = "webpack"
|
||||
webpack_config = "node_modules/flareact/webpack"
|
||||
|
||||
# uncomment and adjust following if you are not using GitHub Actions
|
||||
# kv_namespaces = [{binding="KV_GITHUB_RELEASES", id="xxxx"}]
|
||||
# preview_id = "9581809385634861ae93b0e01677b44d"
|
||||
|
||||
# delete afterwards
|
||||
kv-namespaces = [
|
||||
{ binding = "KV_STATUS_PAGE", id = "c27344947ebb476880fa2ba0ef9bbd10", preview_id = "c27344947ebb476880fa2ba0ef9bbd10" }
|
||||
]
|
||||
|
||||
[triggers]
|
||||
crons = ["* * * * *"]
|
||||
|
||||
[site]
|
||||
bucket = "out"
|
||||
entry-point = "./"
|
||||
|
||||
# uncomment and adjust following if you are not using GitHub Actions
|
||||
#[env.production]
|
||||
#kv-namespaces = [{binding="KV_GITHUB_RELEASES", id="xxxx", preview_id=""}]
|
||||
#zone_id="xxx"
|
||||
#route="xxx"
|
||||
|
Loading…
Reference in New Issue
Block a user