Skip to content

Commit 94efb0d

Browse files
committed
ci: Fix deploy workflow
1 parent eb5ced7 commit 94efb0d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/ci-cd-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ jobs:
4343
secrets: inherit
4444
with:
4545
target_env: ${{ github.ref == 'refs/heads/master' && 'production' || github.ref == 'refs/heads/development' && 'development' || 'invalid' }}
46-
node-version: "22.4.1"
46+
node-version: "22.4.1"
47+
skip_deploy: ${{ github.event_name == 'pull_request' }} # skip deployment if it's a pull request

.github/workflows/lint-and-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
description: 'The deployment environment e.g. production or development'
1717
required: true
1818
type: string
19+
skip_deploy:
20+
description: 'Skip the deploy step (true/false)'
21+
required: true
22+
type: boolean
1923

2024
jobs:
2125
lint:
@@ -81,6 +85,7 @@ jobs:
8185
trigger-deploy:
8286
needs: build
8387
name: Deploy
88+
if: ${{ inputs.skip_deploy == false }}
8489
uses: ./.github/workflows/deploy.yml
8590
secrets: inherit
8691
with:

0 commit comments

Comments
 (0)