Skip to content

Add local development support and some documentation #68

Add local development support and some documentation

Add local development support and some documentation #68

name: Deploy Prod
on:
push:
branches:
- master
env:
WORKER_ENV: prod
RUN: ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}
jobs:
deploy:
runs-on: ubuntu-latest
name: Test & Deploy Prod
environment: prod
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
# Install Dependencies
- name: Install Dependencies
run: npm ci
# Run Pre-Deploy
- name: Pre-Deploy
run: WORKER_ENV=${{env.WORKER_ENV}} node tools/pre-deploy
# Deploy to Cloudflare
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{secrets.CLOUDFLARE_API_TOKEN}}
environment: ${{env.WORKER_ENV}}
workingDirectory: "packages/worker"