Skip to content

Commit 259e418

Browse files
committed
fix: deploy workflow for manual triggering
1 parent 218d383 commit 259e418

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches:
99
- main
10-
# branches that match deploy-* will deploy as well
1110
- deploy-*
1211
workflow_dispatch:
1312
inputs:
@@ -27,7 +26,12 @@ jobs:
2726
runs-on: ubuntu-latest
2827

2928
steps:
30-
- uses: actions/checkout@v6
29+
- name: Checkout selected branch
30+
uses: actions/checkout@v6
31+
with:
32+
# If workflow_dispatch, use the selected branch.
33+
# If push event, use the branch that triggered the workflow.
34+
ref: ${{ github.event.inputs.branch || github.ref_name }}
3135

3236
- name: Configure AWS Credentials
3337
uses: aws-actions/configure-aws-credentials@v5.1.1
@@ -85,6 +89,7 @@ jobs:
8589
8690
echo "Git status after build:"
8791
git status
92+
git diff
8893
8994
CHANGES="$(git status --porcelain)"
9095
if [ -n "$CHANGES" ]; then
@@ -98,4 +103,3 @@ jobs:
98103
else
99104
echo "✅ No uncommitted changes after deploy."
100105
fi
101-

0 commit comments

Comments
 (0)