Skip to content

Commit 28bdf0c

Browse files
authored
ci fix: allow deployment via manual dispatch (#62)
1 parent 88db7eb commit 28bdf0c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

.github/workflows/deploy-wildcat-docker.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
contents: read
2727
deployments: write
2828

29-
# define environments
3029
strategy:
3130
matrix:
3231
include:
@@ -42,11 +41,6 @@ jobs:
4241
vite_keycloak_url: ${{ vars.VITE_KEYCLOAK_URL_DOCKER }}
4342
vite_keycloak_realm: 'dev'
4443
vite_keycloak_client_id: 'bff-dashboard'
45-
46-
# only run job for the selected environment on manual dispatch or on push to a tag
47-
if: |
48-
github.event_name == 'push' ||
49-
(github.event_name == 'workflow_dispatch' && github.event.inputs.environment == matrix.environment)
5044

5145
steps:
5246
- name: Checkout repository
@@ -55,7 +49,6 @@ jobs:
5549
ref: ${{ github.ref }}
5650
fetch-depth: 0
5751

58-
# only allow tags on manual dispatch
5952
- name: Validate Tag on Manual Dispatch
6053
if: github.event_name == 'workflow_dispatch'
6154
run: |
@@ -94,10 +87,9 @@ jobs:
9487

9588
- name: Deploy ${{ matrix.environment }} to Cloudflare Pages (PRODUCTION)
9689
id: deploy_production
97-
if: github.event_name == 'workflow_dispatch'
90+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == matrix.environment
9891
uses: cloudflare/wrangler-action@v3
9992
with:
10093
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
10194
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
102-
# Target the production branch ('main' or 'master') for manual deployments
10395
command: pages deploy dist --project-name=${{ matrix.project_name }} --branch=master

0 commit comments

Comments
 (0)