Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: setup gh action for cf worker deployment #27

Merged
merged 4 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }