Skip to content

Commit fd6e214

Browse files
committed
Support manual deployments
1 parent 2193010 commit fd6e214

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/cicd.yml

+18-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ on:
55
release:
66
types:
77
- published
8+
workflow_dispatch:
9+
inputs:
10+
environment:
11+
description: "Environment to run deploy"
12+
type: environment
13+
required: true
814

915
jobs:
1016
test:
1117
runs-on: ubuntu-latest
1218
steps:
1319
- name: Checkout repository
14-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
1521

1622
- name: Run tests
1723
run: |
18-
echo "TODO: Replace this with actual tests"
24+
echo "Mock testing..."
1925
2026
deploy-to-staging:
2127
needs: test
22-
if: github.ref_name == 'main'
28+
if: github.event_name == 'push' && github.ref_name == 'main'
2329
concurrency: staging
2430
uses: "./.github/workflows/deploy.yml"
2531
with:
@@ -34,3 +40,12 @@ jobs:
3440
with:
3541
environment: production
3642
secrets: inherit
43+
44+
manual-deployment:
45+
# needs: test # NOTE: We elect to skip tests on manual deployments
46+
if: github.event_name == 'workflow_dispatch'
47+
concurrency: ${{ inputs.environment }}
48+
uses: "./.github/workflows/deploy.yml"
49+
with:
50+
environment: ${{ inputs.environment }}
51+
secrets: inherit

0 commit comments

Comments
 (0)