Skip to content

Deploy to Prod

Deploy to Prod #296

Workflow file for this run

name: Deploy to Prod
on:
workflow_dispatch:
inputs:
environment:
description: 'Choose an environment to deploy to: <prod> '
required: true
default: 'prod'
env:
BUILD_ENVIRONMENT: ${{ github.event.inputs.environment }}
KV_LOCAL_ID: ${{ secrets.KV_LOCAL_ID }}
KV_PROD_ID: ${{ secrets.KV_PROD_ID }}
QUEUE_NAME_LOCAL: ${{ secrets.QUEUE_NAME_LOCAL }}
QUEUE_NAME_PROD: ${{ secrets.QUEUE_NAME_PROD }}
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
name: Deploy
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Build & Test
run: |
yarn
yarn run build
yarn run test
yarn build
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy --env ${{ github.event.inputs.environment }}