Skip to content

Deploy to Prod

Deploy to Prod #247

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 }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
KV_LOCAL_ID: ${{ secrets.KV_LOCAL_ID }}
KV_PROD_ID: ${{ secrets.KV_PROD_ID }}
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
name: Deploy
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Build & Test
run: |
yarn
yarn run build
yarn run test
- name: Publish
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
preCommands: yarn build
command: publish --env ${{ github.event.inputs.environment }}
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}