@@ -181,17 +181,19 @@ jobs:
181
181
echo "Skipping deployment for non-PR comment"
182
182
fi
183
183
fi
184
+ if [[ "${{ env.DO_DEPLOY }}" == "false" ]]; then
185
+ exit 0
186
+ fi
184
187
185
188
- name : Setup Control Plane App if Not Existing
186
- if : env.DO_DEPLOY == 'true' && env. APP_EXISTS == 'false'
189
+ if : env.APP_EXISTS == 'false'
187
190
env :
188
191
CPLN_TOKEN : ${{ secrets.CPLN_TOKEN_STAGING }}
189
192
run : |
190
193
echo "🔧 Setting up new Control Plane app..."
191
194
cpflow setup-app -a ${{ env.APP_NAME }} --org ${{ vars.CPLN_ORG_STAGING }}
192
195
193
196
- name : Create Initial Comment
194
- if : env.DO_DEPLOY != 'false'
195
197
uses : actions/github-script@v7
196
198
id : create-comment
197
199
with :
@@ -200,13 +202,12 @@ jobs:
200
202
owner: context.repo.owner,
201
203
repo: context.repo.repo,
202
204
issue_number: process.env.PR_NUMBER,
203
- body: '🚀 Starting deployment process...\n\n' + process.env.CONSOLE_LINK
205
+ body: '🚀 Starting deployment process...\n\n'
204
206
});
205
207
core.setOutput('comment-id', result.data.id);
206
208
207
209
- name : Set Deployment URLs
208
210
id : set-urls
209
- if : env.DO_DEPLOY != 'false'
210
211
uses : actions/github-script@v7
211
212
with :
212
213
script : |
@@ -237,7 +238,6 @@ jobs:
237
238
);
238
239
239
240
- name : Initialize GitHub Deployment
240
- if : env.DO_DEPLOY != 'false'
241
241
uses : actions/github-script@v7
242
242
id : init-deployment
243
243
with :
@@ -316,15 +316,13 @@ jobs:
316
316
});
317
317
318
318
- name : Deploy to Control Plane
319
- if : env.DO_DEPLOY != 'false'
320
319
run : cpflow deploy-image -a ${{ env.APP_NAME }} --run-release-phase --org ${{ vars.CPLN_ORG_STAGING }} --verbose
321
320
322
321
- name : Retrieve App URL
323
322
id : workload
324
323
run : echo "WORKLOAD_URL=$(cpln workload get rails --gvc ${{ env.APP_NAME }} | tee | grep -oP 'https://[^[:space:]]*\.cpln\.app(?=\s|$)' | head -n1)" >> "$GITHUB_OUTPUT"
325
324
326
325
- name : Update Status - Deployment Complete
327
- if : env.DO_DEPLOY != 'false'
328
326
uses : actions/github-script@v7
329
327
with :
330
328
script : |
0 commit comments