Skip to content

Commit f84c6c4

Browse files
authored
feat: enable manual deployment for roomote apps (#207)
1 parent aea4ea6 commit f84c6c4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/deploy-roomote.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,30 @@ on:
1111
- 'packages/ipc/**'
1212
- 'packages/job-auth/**'
1313
- '.env.production'
14+
workflow_dispatch:
15+
inputs:
16+
environment:
17+
description: 'Environment to deploy to'
18+
required: true
19+
default: 'production'
20+
type: choice
21+
options:
22+
- production
23+
deploy_api:
24+
description: 'Deploy roomote-api'
25+
required: false
26+
default: true
27+
type: boolean
28+
deploy_controller:
29+
description: 'Deploy roomote-controller'
30+
required: false
31+
default: true
32+
type: boolean
33+
deploy_worker:
34+
description: 'Deploy roomote-worker'
35+
required: false
36+
default: true
37+
type: boolean
1438

1539
env:
1640
NODE_VERSION: 20.19.2
@@ -51,18 +75,21 @@ jobs:
5175
echo "FLY_ACCESS_TOKEN=$FLY_ACCESS_TOKEN" >> $GITHUB_ENV
5276
5377
- name: Build and deploy roomote-api
78+
if: ${{ github.event_name == 'push' || inputs.deploy_api }}
5479
env:
5580
FLY_ACCESS_TOKEN: ${{ env.FLY_ACCESS_TOKEN }}
5681
run: |
5782
flyctl deploy --config fly.roomote-api.toml --remote-only
5883
5984
- name: Build and deploy roomote-controller
85+
if: ${{ github.event_name == 'push' || inputs.deploy_controller }}
6086
env:
6187
FLY_ACCESS_TOKEN: ${{ env.FLY_ACCESS_TOKEN }}
6288
run: |
6389
flyctl deploy --config fly.roomote-controller.toml --remote-only
6490
6591
- name: Build and deploy roomote-worker
92+
if: ${{ github.event_name == 'push' || inputs.deploy_worker }}
6693
env:
6794
FLY_ACCESS_TOKEN: ${{ env.FLY_ACCESS_TOKEN }}
6895
DOTENV_PRIVATE_KEY_PRODUCTION: ${{ secrets.DOTENV_PRIVATE_KEY_PRODUCTION }}

0 commit comments

Comments
 (0)