Skip to content

Commit

Permalink
Merge pull request #27 from Judge-Paul/dev
Browse files Browse the repository at this point in the history
feat: setup gh action for cf worker deployment
  • Loading branch information
Judge-Paul authored Oct 13, 2024
2 parents fe14f12 + 5e82ca9 commit 6740433
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/deploy-cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy to Cloudflare Workers

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: "server"
command: deploy
1 change: 0 additions & 1 deletion server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
.env
.wrangler
wrangler.toml
.dev.vars
10 changes: 10 additions & 0 deletions server/wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Top-level configuration
name = "coverwrite"
main = "index.ts"
compatibility_date = "2024-10-13"

[[unsafe.bindings]]
name= "RATE_LIMITER"
type = "ratelimit"
namespace_id = "904"
simple = { limit = 1, period = 60 }

0 comments on commit 6740433

Please sign in to comment.