Skip to content

Deploy "image-production" by @preschian #270

Deploy "image-production" by @preschian

Deploy "image-production" by @preschian #270

Workflow file for this run

name: Deploy to Cloudflare workers
run-name: Deploy "${{ inputs.worker }}-${{ inputs.environment }}" by @${{ github.actor }}
on:
workflow_dispatch:
inputs:
worker:
description: 'Name of the worker'
required: true
type: choice
options: # please add manually if you add new worker
- capture
- counter
- durable-jpeg
- frame
- image
- keywise
- newsletter
- ogi-route
- party
- polysearch
- price
- scheduled
- ssr-opengraph
environment:
description: 'Choose an environment'
required: true
type: choice
default: 'beta'
options:
- default
- beta
- production
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Deploy (beta or production)
if: github.event.inputs.environment == 'beta' || github.event.inputs.environment == 'production'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: ./services/${{ github.event.inputs.worker }}
command: deploy --env ${{ github.event.inputs.environment }}
packageManager: pnpm
- name: Deploy (default)
if: github.event.inputs.environment != 'beta' && github.event.inputs.environment != 'production'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: ./services/${{ github.event.inputs.worker }}
packageManager: pnpm