install github actions

This commit is contained in:
Jeff Emmett 2024-12-09 03:51:54 -05:00
parent 84e737216d
commit cca1a06b9f
1 changed files with 32 additions and 0 deletions

32
.github/workflows/deploy-worker.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Deploy Worker
on:
push:
branches:
- main # or 'production' depending on your branch name
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy Worker
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install Dependencies
run: npm ci
working-directory: ./worker
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: "worker"
command: deploy
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}