File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 5757 path : ${{ runner.temp }}
5858 - uses : ./.github/actions/setup
5959 - name : Deploy Published Workers
60- run : pnpm runx deploy-published-workers
60+ run : pnpm runx deploy-published-workers --env production
6161 env :
6262 CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6363 CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pnpm runx <command> [options]
2929
3030Available commands:
3131
32- - ` deploy-published-workers ` : Deploy published Workers based packages that changesets marked as published in the current release.
32+ - ` deploy-published-workers ` : Deploy Cloudflare Workers ( based on which packages changesets marked as published in the release) .
3333
3434Note:
3535
Original file line number Diff line number Diff line change 11import { Command } from '@commander-js/extra-typings'
2+ import { validateArg } from '@jahands/cli-tools'
3+ import z from 'zod'
24
35import { getPublishedPackages } from '../changesets'
46
57export const deployPublishedWorkersCmd = new Command ( 'deploy-published-workers' )
68 . description (
7- 'Deploy Cloudflare Workers to production (based on which packages changesets marked as published in the release)'
9+ 'Deploy Cloudflare Workers (based on which packages changesets marked as published in the release)'
810 )
9- . action ( async ( ) => {
11+ . requiredOption (
12+ '-e, --env <staging|production>' ,
13+ 'The environment to deploy to' ,
14+ validateArg ( z . enum ( [ 'staging' , 'production' ] ) )
15+ )
16+ . action ( async ( { env } ) => {
1017 const publishedPackages = await getPublishedPackages ( )
1118
1219 // This technically includes all versioned packages (including non-Workers),
@@ -15,5 +22,5 @@ export const deployPublishedWorkersCmd = new Command('deploy-published-workers')
1522
1623 await $ ( {
1724 verbose : true ,
18- } ) `turbo deploy ${ filters } `
25+ } ) `turbo deploy ${ filters } -- --env ${ env } `
1926 } )
You can’t perform that action at this time.
0 commit comments