mirror of
https://github.com/tormachris/cf-workers-status-page.git
synced 2024-11-23 22:45:43 +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
|
name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- repository_dispatch
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
repository_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -13,9 +18,18 @@ jobs:
|
|||||||
- run: yarn install
|
- run: yarn install
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
- name: Publish
|
- name: Publish
|
||||||
uses: cloudflare/wrangler-action@1.2.0
|
uses: cloudflare/wrangler-action@1.3.0
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
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:
|
env:
|
||||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
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:
|
settings:
|
||||||
title: "Status Page"
|
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
|
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"
|
allmonitorsOperational: "All Systems Operational"
|
||||||
notAllmonitorsOperational: "Not All Systems Operational"
|
notAllmonitorsOperational: "Not All Systems Operational"
|
||||||
monitorLabelOperational: "Operational"
|
monitorLabelOperational: "Operational"
|
||||||
monitorLabelNotOperational: "Not great not terrible"
|
monitorLabelNotOperational: "Not Operational"
|
||||||
monitorLabelNoData: "No data"
|
monitorLabelNoData: "No data"
|
||||||
dayInHistogramNoData: "No data"
|
dayInHistogramNoData: "No data"
|
||||||
dayInHistogramOperational: "All good"
|
dayInHistogramOperational: "All good"
|
||||||
dayInHistogramNotOperational: "Some checks failed"
|
dayInHistogramNotOperational: "Some checks failed"
|
||||||
|
|
||||||
monitors:
|
monitors:
|
||||||
- id: kiwi-com-homepage
|
- id: status-page-eidam-dev # unique identifier
|
||||||
name: Kiwi.com homepage
|
name: Eidam's Status Page
|
||||||
description: Kiwi.com en homepage
|
description: 'https://status-page.eidam.dev' # default=empty
|
||||||
url: 'https://www.kiwi.com/en/'
|
url: 'https://status-page.eidam.dev/' # URL to fetch
|
||||||
method: GET
|
method: GET # default=GET
|
||||||
expectStatus: 200
|
expectStatus: 200 # operational status, default=200
|
||||||
followRedirect: false
|
followRedirect: false # should fetch follow redirects, default=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: cf-workers-status-page
|
- id: cf-workers-status-page
|
||||||
name: This Workers Status Page project made public
|
name: Github.com Cloudflare Workers Status Page
|
||||||
description: /shrug
|
description: Is the Github repository public?
|
||||||
url: 'https://github.com/adam-janis/cf-workers-status-page'
|
url: 'https://github.com/eidam/cf-workers-status-page'
|
||||||
method: GET
|
method: GET
|
||||||
expectStatus: 200
|
expectStatus: 200
|
||||||
|
|
||||||
- id: kiwicomapi-cn
|
- id: eidam-dev
|
||||||
name: Some other site
|
name: Eidam.dev (403)
|
||||||
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
|
|
||||||
description: 'Eidam.dev homepage, there is none'
|
description: 'Eidam.dev homepage, there is none'
|
||||||
url: 'https://eidam.dev'
|
url: 'https://eidam.dev'
|
||||||
method: GET
|
method: GET
|
||||||
expectStatus: 403
|
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"
|
name = "cf-workers-status-page"
|
||||||
type = "webpack"
|
|
||||||
account_id = ""
|
|
||||||
workers_dev = true
|
workers_dev = true
|
||||||
route = ""
|
account_id = ""
|
||||||
zone_id = ""
|
type = "webpack"
|
||||||
webpack_config = "node_modules/flareact/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]
|
[triggers]
|
||||||
crons = ["* * * * *"]
|
crons = ["* * * * *"]
|
||||||
|
|
||||||
[site]
|
[site]
|
||||||
bucket = "out"
|
bucket = "out"
|
||||||
entry-point = "./"
|
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