Skip to content

Commit

Permalink
chore: Add deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
richeyphu committed Jul 13, 2024
1 parent 0af517e commit 5ac560f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dev.vars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KV_NAMESPACEID = "YOUR_KV_NAMESPACEID"
PREVIEW_KV_NAMESPACEID = "YOUR_PREVIEW_KV_NAMESPACEID"
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to Cloudflare Workers

on:
push:
branches:
- main
repository_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
env:
KV_NAMESPACEID: ${{ secrets.KV_NAMESPACEID }}

0 comments on commit 5ac560f

Please sign in to comment.