Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
milankomaj committed Feb 14, 2024
1 parent 7f27343 commit 3c05ac4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 27 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,34 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '12'
- run: apt-fast update && apt-fast install -y jq
node-version: '16'
- run: yarn install
- run: yarn kv-gc
- run: yarn build
- name: Publish
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
preCommands: |
export KV_NAMESPACE_ID=$(npx @cloudflare/wrangler@1 kv:namespace list 2> >(tee stderr.log >&2) | head -1 | node -pe "JSON.parse(fs.readFileSync('/dev/stdin').toString()).find(kv => kv.title.includes('KV_STATUS_PAGE')).id")
postCommands: |
#- name: Publish
#uses: cloudflare/[email protected]
#with:
#apiToken: ${{ secrets.CF_API_TOKEN }}
#preCommands: |
#apt-get update && apt-get install -y jq
#export KV_NAMESPACE_ID=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("KV_STATUS_PAGE")))' | jq -r ".[0].id")
#namespace_id=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("__status-workers_sites_assets")))' | jq -r ".[0].id")

#postCommands: |
#yarn kv-gc
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
KV_NAMESPACE_ID: ${{ secrets.KV_NAMESPACE_ID }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
timestamp:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Timestamp
shell: bash
run: |
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
"dev": "flareact dev",
"build": "yarn css && flareact build",
"deploy": "yarn build && flareact publish",
"kv-gc": "node ./src/cli/gcMonitors.js",
"kv-gc": "node ./src/cli/gcMonitors.mjs",
"format": "prettier --write '**/*.{js,css,json,md}'",
"css": "postcss public/tailwind.css -o public/style.css"
},
"dependencies": {
"flareact": "^0.10.0",
"flareact": "^1.5.0",
"laco": "^1.2.1",
"laco-react": "^1.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"autoprefixer": "^10.0.2",
"node-fetch": "^2.6.1",
"postcss": "^8.2.10",
"postcss-cli": "^8.3.0",
"prettier": "^2.2.0",
"tailwindcss": "^2.0.1",
"autoprefixer": "^10.4.14",
"node-fetch": "^3.3.1",
"postcss": "^8.4.23",
"postcss-cli": "^10.1.0",
"prettier": "^3.0.3",
"tailwindcss": "^3.3.2",
"yaml-loader": "^0.6.0"
}
}
17 changes: 12 additions & 5 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name = "status"
compatibility_date = "2022-04-05"
#account_id = ""
workers_dev = true
account_id = ""
type = "webpack"
webpack_config = "node_modules/flareact/webpack"
compatibility_date = "2021-07-23"
main = "./index.js"
kv_namespaces = [{binding="KV_STATUS_PAGE", id="f0d41ec3d6f545188d33f201fd6680a7", preview_id="f0d41ec3d6f545188d33f201fd6680a7"}]

[build]
command = "npm run build"

[triggers]
crons = ["*/10 * * * *"]

[site]
bucket = "out"
entry-point = "./"
#entry-point = "./"

# uncomment and adjust following if you are not using GitHub Actions
#[env.production]
#kv-namespaces = [{binding="KV_STATUS_PAGE", id="xxxx", preview_id=""}]
#zone_id="xxx"
#route="xxx"

0 comments on commit 3c05ac4

Please sign in to comment.